Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add golangci #6418

Merged
merged 119 commits into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from 104 commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
538eded
Added golangci-lint
kolaente Mar 23, 2019
86b0ce5
Autofix
kolaente Mar 23, 2019
a4a1fe0
Fixed a lot of lint errs
kolaente Mar 23, 2019
49b7083
Fixed more errors
kolaente Mar 23, 2019
5dc1bb0
Fixed err
kolaente Mar 23, 2019
26accd2
Fixed some more lint errors
kolaente Mar 23, 2019
db707e9
Fixed most issues
kolaente Mar 24, 2019
c7aedad
Fixed more issues
kolaente Mar 24, 2019
5a3bbe1
Merge branch 'gitea-master' into golanci
kolaente Mar 24, 2019
95b89b1
Merge with gitea-master
kolaente Mar 27, 2019
e18f584
Fixed more issues
kolaente Mar 27, 2019
4522535
Renamed lint to revive
kolaente Mar 27, 2019
c5b223a
Merge branch 'master' of github.com:go-gitea/gitea into golanci
kolaente Mar 27, 2019
0dad3b6
Merge branch 'master' of github.com:go-gitea/gitea into golanci
kolaente Apr 1, 2019
1a7609c
Merge with gitea-master
kolaente Apr 6, 2019
ed28312
Removed unused template file
kolaente Apr 6, 2019
18bf983
Fixed lint errors
kolaente Apr 6, 2019
073e9c0
Merge with gitea-master
kolaente Apr 11, 2019
a2a16b9
Fixed lint errors
kolaente Apr 11, 2019
5523208
Merge with gitea-master
kolaente Apr 14, 2019
e426b40
Fix error handling
kolaente Apr 14, 2019
52d07f6
Fix error handling
kolaente Apr 14, 2019
00c0107
Updated version
kolaente Apr 14, 2019
612e09a
fixed lint errors
kolaente Apr 14, 2019
bce1b4c
Merge branch 'master' into golanci
kolaente Apr 15, 2019
5a498c6
fixed lint errors
kolaente Apr 15, 2019
ad2c642
fixed lint errors
kolaente Apr 15, 2019
d923a72
fixed lint errors
kolaente Apr 15, 2019
bf83f63
Merge branch 'master' into golanci
kolaente Apr 15, 2019
7a90087
Merge branch 'master' into golanci
kolaente Apr 16, 2019
ba9aaef
fixed lint errors
kolaente Apr 16, 2019
9f04b4e
Merge branch 'master' of github.com:go-gitea/gitea into golanci
kolaente Apr 17, 2019
f9e650f
Fixed lint errors
kolaente Apr 17, 2019
eaa5a15
Fixed some failing unit tests
kolaente Apr 17, 2019
9c85563
Merge branch 'master' of github.com:go-gitea/gitea into golanci
kolaente Apr 17, 2019
75b352e
merge with gitea-master
kolaente Apr 18, 2019
df7f0bf
Fixed some lint issues
kolaente Apr 18, 2019
c341b60
Fixed some lint issues
kolaente Apr 18, 2019
0566bdf
Fixed lint errors
kolaente Apr 18, 2019
207a9c3
Merge with gitea-master
kolaente Apr 22, 2019
3240b37
Fixed lint issues
kolaente Apr 22, 2019
96f2148
Use crypto/rand instead of math/rand
kolaente Apr 22, 2019
3a4a369
Update modules/lfs/locks.go
zeripath Apr 22, 2019
e6dc55d
Update modules/lfs/locks.go
zeripath Apr 22, 2019
8232200
Update modules/lfs/locks.go
zeripath Apr 22, 2019
8cd3b09
rearranged imports
kolaente Apr 22, 2019
fed01f6
Merge branch 'master' into golanci
kolaente Apr 22, 2019
1f213bd
fmt
kolaente Apr 22, 2019
bac180a
Merge remote-tracking branch 'origin/golanci' into golanci
kolaente Apr 22, 2019
292b374
Merge branch 'master' into golanci
kolaente Apr 23, 2019
676eb5f
Merge branch 'master' into golanci
kolaente Apr 24, 2019
49b03ac
Merge with gitea-master
kolaente Apr 26, 2019
751900c
Fixed lint errors
kolaente Apr 27, 2019
fe9b4b7
Merge branch 'master' into golanci
kolaente Apr 29, 2019
7ddb9df
Merge branch 'master' into golanci
kolaente Apr 30, 2019
ca25205
Merge branch 'master' into golanci
kolaente Apr 30, 2019
6db1908
Merge branch 'master' into golanci
kolaente May 2, 2019
01c390a
Merge branch 'master' into golanci
kolaente May 3, 2019
d6a6f2d
Merge branch 'master' into golanci
kolaente May 5, 2019
0d1488a
Fixed lint issues
kolaente May 5, 2019
8fd5962
Removed fixme
kolaente May 5, 2019
d845651
Merge branch 'master' into golanci
kolaente May 5, 2019
cab2bda
Merge branch 'master' into golanci
kolaente May 7, 2019
160e86f
Merge branch 'master' into golanci
kolaente May 8, 2019
5bd754f
Merge branch 'master' of github.com:go-gitea/gitea into golanci
kolaente May 8, 2019
26cf168
Fixed Wrong change
kolaente May 8, 2019
25bf975
Sorted imports
kolaente May 8, 2019
dab7850
More error handling
kolaente May 8, 2019
a8dfe8b
Merge branch 'master' into golanci
kolaente May 8, 2019
2a461f1
More error handling
kolaente May 8, 2019
2143cea
Update modules/markup/html.go
ngourdon May 8, 2019
c6cf8e3
More error handling + sort order
kolaente May 8, 2019
f1b90f0
Merge remote-tracking branch 'origin/golanci' into golanci
kolaente May 8, 2019
2a8aa70
Fixed css
kolaente May 8, 2019
1fb8ead
Merge branch 'master' into golanci
kolaente May 10, 2019
8a45df9
Fixed unneded raw strings
kolaente May 11, 2019
b45517a
Merge branch 'master' into golanci
kolaente May 11, 2019
3cca1da
Merge branch 'master' into golanci
kolaente May 11, 2019
376a9f4
Merge branch 'master' into golanci
kolaente May 13, 2019
8671bcb
Merge branch 'master' into golanci
kolaente May 21, 2019
7e20300
Fixed a lot of lint issues
kolaente May 21, 2019
11b2509
css
kolaente May 21, 2019
3feb9eb
Merge branch 'master' into golanci
kolaente May 22, 2019
b3b6042
Merge branch 'master' into golanci
kolaente May 28, 2019
54d9a6f
Merge branch 'master' into golanci
kolaente May 28, 2019
25b5800
Merge branch 'master' into golanci
kolaente May 29, 2019
40be393
Fixed lint
kolaente May 29, 2019
e640971
Merge branch 'master' of github.com:go-gitea/gitea into golanci
kolaente May 30, 2019
5164aa0
Fixed some lint issues
kolaente May 30, 2019
ade65b2
Update models/login_source.go
kolaente May 30, 2019
fc7d386
Merge remote-tracking branch 'origin/golanci' into golanci
kolaente May 30, 2019
2d9eeed
Update routers/repo/http.go
kolaente May 30, 2019
427f778
Update routers/repo/http.go
kolaente May 30, 2019
e43c3f9
Merge remote-tracking branch 'origin/golanci' into golanci
kolaente May 30, 2019
38691f5
Log error instead of returning it when rolling a session back
kolaente May 30, 2019
e07b770
Log error instead of returning it when rolling a session back
kolaente May 30, 2019
2c9c43f
Always return, don't ignore
kolaente May 30, 2019
19adbe0
Log the error when deleting/restoring because of a previous error
kolaente May 30, 2019
9da3590
Only log the error when closing an sql row set
kolaente May 30, 2019
d9c8a5f
Scoped tmp path wiki removing
kolaente May 30, 2019
853fd7b
merge with gitea-master
kolaente Jun 6, 2019
54f0f41
Fixed lint errors
kolaente Jun 6, 2019
6f53a9c
Fixed wiki test
kolaente Jun 6, 2019
99c9837
Always scoped errors in defer function calls
kolaente Jun 6, 2019
3684708
removed unneeded named return
kolaente Jun 6, 2019
34cfe33
Fixed instance of the xorm not being passed and used correctly
kolaente Jun 6, 2019
7294d13
Added extra method to pass the xorm session to getReleaseAttachments
kolaente Jun 6, 2019
ba5d2c0
merge with gitea-master
kolaente Jun 9, 2019
914e5a5
Fixed lint errors
kolaente Jun 9, 2019
4dc710b
Merge branch 'master' into golanci
kolaente Jun 10, 2019
86d62f4
Merge branch 'master' into golanci
kolaente Jun 10, 2019
0866502
Merge branch 'master' into golanci
kolaente Jun 10, 2019
efb4ab7
Smaller fixes
kolaente Jun 10, 2019
e7ca38d
Merge branch 'master' into golanci
kolaente Jun 10, 2019
097b0dd
Merge branch 'master' of github.com:go-gitea/gitea into golanci
kolaente Jun 11, 2019
cbf861d
Re-added validation
kolaente Jun 11, 2019
c760c02
Fix ShowSubcommandHelp behaviour
jonasfranz Jun 11, 2019
9f5ba0d
Merge branch 'master' into golanci
kolaente Jun 11, 2019
4a865f4
Merge branch 'master' into golanci
lunny Jun 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,10 @@ pipeline:
commands:
- make clean
- make generate
- make vet
- make lint
- make fmt-check
- make golangci-lint
- make revive
- make swagger-check
- make swagger-validate
- make misspell-check
- make test-vendor
- make build
when:
Expand Down
97 changes: 97 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
linters:
enable:
- gosimple
- deadcode
- typecheck
- govet
- errcheck
- staticcheck
- unused
- structcheck
- varcheck
- golint
- dupl
#- gocyclo # The cyclomatic complexety of a lot of functions is too high, we should refactor those another time.
- gofmt
- misspell
- gocritic
enable-all: false
disable-all: true
fast: false

linters-settings:
gocritic:
disabled-checks:
- ifElseChain
- singleCaseSwitch # Every time this occured in the code, there was no other way.

issues:
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- unparam
- staticcheck
- path: models/migrations/v
linters:
- gocyclo
- errcheck
- dupl
- gosec
- linters:
- dupl
text: "webhook"
- linters:
- gocritic
text: "`ID' should not be capitalized"
- path: modules/templates/helper.go
linters:
- gocritic
- linters:
- unused
- deadcode
text: "swagger"
- path: contrib/pr/checkout.go
linters:
- errcheck
- path: models/issue.go
linters:
- errcheck
- path: models/migrations/
linters:
- errcheck
- path: modules/log/
linters:
- errcheck
- path: routers/routes/routes.go
linters:
- dupl
- path: routers/repo/view.go
linters:
- dupl
- path: models/migrations/
linters:
- unused
- linters:
- staticcheck
text: "argument x is overwritten before first use"
- path: modules/httplib/httplib.go
linters:
- staticcheck
# Enabling this would require refactoring the methods and how they are called.
- path: models/issue_comment_list.go
linters:
- dupl
# "Destroy" is misspelled in github.com/go-macaron/session/session.go:213 so it's not our responsability to fix it
- path: modules/session/virtual.go
linters:
- misspell
text: '`Destory` is a misspelling of `Destroy`'
- path: modules/session/memory.go
linters:
- misspell
text: '`Destory` is a misspelling of `Destroy`'
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ errcheck:

.PHONY: lint
lint:
@echo 'make lint is depricated. Use "make revive" if you want to use the old lint tool, or "make golangci-lint" to run a complete code check.'

.PHONY: revive
revive:
@hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/mgechev/revive; \
fi
Expand Down Expand Up @@ -461,3 +465,10 @@ generate-images:
.PHONY: pr
pr:
$(GO) run contrib/pr/checkout.go $(PR)

.PHONY: golangci-lint
golangci-lint:
@hash golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.16.0; \
fi
golangci-lint run
2 changes: 1 addition & 1 deletion cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ func runUpdateOauth(c *cli.Context) error {
}

// update custom URL mapping
var customURLMapping *oauth2.CustomURLMapping
var customURLMapping = &oauth2.CustomURLMapping{}

if oAuth2Config.CustomURLMapping != nil {
customURLMapping.TokenURL = oAuth2Config.CustomURLMapping.TokenURL
Expand Down
21 changes: 16 additions & 5 deletions cmd/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,28 @@ func runCert(c *cli.Context) error {
if err != nil {
log.Fatalf("Failed to open cert.pem for writing: %v", err)
}
pem.Encode(certOut, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes})
certOut.Close()
err = pem.Encode(certOut, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes})
if err != nil {
log.Fatalf("Failed to encode certificate: %v", err)
}
err = certOut.Close()
if err != nil {
log.Fatalf("Failed to write cert: %v", err)
}
log.Println("Written cert.pem")

keyOut, err := os.OpenFile("key.pem", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
log.Fatalf("Failed to open key.pem for writing: %v", err)
}
pem.Encode(keyOut, pemBlockForKey(priv))
keyOut.Close()
err = pem.Encode(keyOut, pemBlockForKey(priv))
if err != nil {
log.Fatalf("Failed to encode key: %v", err)
}
err = keyOut.Close()
if err != nil {
log.Fatalf("Failed to write key: %v", err)
}
log.Println("Written key.pem")

return nil
}
6 changes: 2 additions & 4 deletions cmd/serv.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
)

const (
accessDenied = "Repository does not exist or you do not have access"
lfsAuthenticateVerb = "git-lfs-authenticate"
)

Expand Down Expand Up @@ -67,7 +66,7 @@ func checkLFSVersion() {
}

func setup(logPath string) {
log.DelLogger("console")
_ = log.DelLogger("console")
setting.NewContext()
checkLFSVersion()
}
Expand Down Expand Up @@ -112,8 +111,7 @@ func runServ(c *cli.Context) error {
}

if len(c.Args()) < 1 {
cli.ShowSubcommandHelp(c)
return nil
return cli.ShowSubcommandHelp(c)
kolaente marked this conversation as resolved.
Show resolved Hide resolved
}

keys := strings.Split(c.Args()[0], "-")
Expand Down
9 changes: 7 additions & 2 deletions cmd/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,16 @@ func runWeb(ctx *cli.Context) error {
}
err = runHTTPS(listenAddr, setting.CertFile, setting.KeyFile, context2.ClearHandler(m))
case setting.FCGI:
listener, err := net.Listen("tcp", listenAddr)
var listener net.Listener
listener, err = net.Listen("tcp", listenAddr)
if err != nil {
log.Fatal("Failed to bind %s: %v", listenAddr, err)
}
defer listener.Close()
defer func() {
if err := listener.Close(); err != nil {
log.Fatal("Failed to stop server: %v", err)
}
}()
err = fcgi.Serve(listener, context2.ClearHandler(m))
case setting.UnixSocket:
if err := os.Remove(listenAddr); err != nil && !os.IsNotExist(err) {
Expand Down
3 changes: 1 addition & 2 deletions contrib/pr/checkout.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ func runPR() {
routers.NewServices()
//x, err = xorm.NewEngine("sqlite3", "file::memory:?cache=shared")

var helper testfixtures.Helper
helper = &testfixtures.SQLite{}
var helper testfixtures.Helper = &testfixtures.SQLite{}
models.NewEngine(func(_ *xorm.Engine) error {
return nil
})
Expand Down
2 changes: 1 addition & 1 deletion integrations/branches_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func branchAction(t *testing.T, button string) (*HTMLDoc, string) {
req = NewRequestWithValues(t, "POST", link, map[string]string{
"_csrf": getCsrf(t, htmlDoc.doc),
})
resp = session.MakeRequest(t, req, http.StatusOK)
session.MakeRequest(t, req, http.StatusOK)

url, err := url.Parse(link)
assert.NoError(t, err)
Expand Down
6 changes: 3 additions & 3 deletions integrations/editor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestCreateFile(t *testing.T) {
"content": "Content",
"commit_choice": "direct",
})
resp = session.MakeRequest(t, req, http.StatusFound)
session.MakeRequest(t, req, http.StatusFound)
})
}

Expand All @@ -48,15 +48,15 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
"_csrf": csrf,
"protected": "on",
})
resp := session.MakeRequest(t, req, http.StatusFound)
session.MakeRequest(t, req, http.StatusFound)
// Check if master branch has been locked successfully
flashCookie := session.GetCookie("macaron_flash")
assert.NotNil(t, flashCookie)
assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Bbranch%2B%2527master%2527%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)

// Request editor page
req = NewRequest(t, "GET", "/user2/repo1/_new/master/")
resp = session.MakeRequest(t, req, http.StatusOK)
resp := session.MakeRequest(t, req, http.StatusOK)

doc := NewHTMLParser(t, resp.Body)
lastCommit := doc.GetInputValueByName("last_commit")
Expand Down
11 changes: 5 additions & 6 deletions integrations/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type NilResponseRecorder struct {
}

func (n *NilResponseRecorder) Write(b []byte) (int, error) {
n.Length = n.Length + len(b)
n.Length += len(b)
return len(b), nil
}

Expand Down Expand Up @@ -141,8 +141,7 @@ func initIntegrationTest() {
if err != nil {
log.Fatalf("sql.Open: %v", err)
}
rows, err := db.Query(fmt.Sprintf("SELECT 1 FROM pg_database WHERE datname = '%s'",
models.DbCfg.Name))
rows, err := db.Query(fmt.Sprintf("SELECT 1 FROM pg_database WHERE datname = '%s'", models.DbCfg.Name))
if err != nil {
log.Fatalf("db.Query: %v", err)
}
Expand Down Expand Up @@ -210,7 +209,7 @@ func (s *TestSession) MakeRequest(t testing.TB, req *http.Request, expectedStatu
resp := MakeRequest(t, req, expectedStatus)

ch := http.Header{}
ch.Add("Cookie", strings.Join(resp.HeaderMap["Set-Cookie"], ";"))
ch.Add("Cookie", strings.Join(resp.Header()["Set-Cookie"], ";"))
cr := http.Request{Header: ch}
s.jar.SetCookies(baseURL, cr.Cookies())

Expand All @@ -226,7 +225,7 @@ func (s *TestSession) MakeRequestNilResponseRecorder(t testing.TB, req *http.Req
resp := MakeRequestNilResponseRecorder(t, req, expectedStatus)

ch := http.Header{}
ch.Add("Cookie", strings.Join(resp.HeaderMap["Set-Cookie"], ";"))
ch.Add("Cookie", strings.Join(resp.Header()["Set-Cookie"], ";"))
cr := http.Request{Header: ch}
s.jar.SetCookies(baseURL, cr.Cookies())

Expand Down Expand Up @@ -266,7 +265,7 @@ func loginUserWithPassword(t testing.TB, userName, password string) *TestSession
resp = MakeRequest(t, req, http.StatusFound)

ch := http.Header{}
ch.Add("Cookie", strings.Join(resp.HeaderMap["Set-Cookie"], ";"))
ch.Add("Cookie", strings.Join(resp.Header()["Set-Cookie"], ";"))
cr := http.Request{Header: ch}

session := emptyTestSession(t)
Expand Down
2 changes: 1 addition & 1 deletion integrations/lfs_getobject_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func storeObjectInRepo(t *testing.T, repositoryID int64, content *[]byte) string
lfsMetaObject = &models.LFSMetaObject{Oid: oid, Size: int64(len(*content)), RepositoryID: repositoryID}
}

lfsID = lfsID + 1
lfsID++
lfsMetaObject, err = models.NewLFSMetaObject(lfsMetaObject)
assert.NoError(t, err)
contentStore := &lfs.ContentStore{BasePath: setting.LFS.ContentPath}
Expand Down
15 changes: 0 additions & 15 deletions integrations/migration-test/migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,6 @@ func initMigrationTest(t *testing.T) {
setting.NewLogServices(true)
}

func getDialect() string {
dialect := "sqlite"
switch {
case setting.UseSQLite3:
dialect = "sqlite"
case setting.UseMySQL:
dialect = "mysql"
case setting.UsePostgreSQL:
dialect = "pgsql"
case setting.UseMSSQL:
dialect = "mssql"
}
return dialect
}

func availableVersions() ([]string, error) {
migrationsDir, err := os.Open("integrations/migration-test")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion integrations/testlogger.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func PrintCurrentTest(t testing.TB, skip ...int) {
_, filename, line, _ := runtime.Caller(actualSkip)

if log.CanColorStdout {
fmt.Fprintf(os.Stdout, "=== %s (%s:%d)\n", log.NewColoredValue(t.Name()), strings.TrimPrefix(filename, prefix), line)
fmt.Fprintf(os.Stdout, "=== %s (%s:%d)\n", fmt.Formatter(log.NewColoredValue(t.Name())), strings.TrimPrefix(filename, prefix), line)
} else {
fmt.Fprintf(os.Stdout, "=== %s (%s:%d)\n", t.Name(), strings.TrimPrefix(filename, prefix), line)
}
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var (

func init() {
setting.AppVer = Version
setting.AppBuiltWith = formatBuiltWith(Tags)
setting.AppBuiltWith = formatBuiltWith()

// Grab the original help templates
originalAppHelpTemplate = cli.AppHelpTemplate
Expand All @@ -56,7 +56,7 @@ func main() {
app.Usage = "A painless self-hosted Git service"
app.Description = `By default, gitea will start serving using the webserver with no
arguments - which can alternatively be run by running the subcommand web.`
app.Version = Version + formatBuiltWith(Tags)
app.Version = Version + formatBuiltWith()
app.Commands = []cli.Command{
cmd.CmdWeb,
cmd.CmdServ,
Expand Down Expand Up @@ -178,7 +178,7 @@ DEFAULT CONFIGURATION:
`, originalTemplate, setting.CustomPath, overrided, setting.CustomConf, setting.AppPath, setting.AppWorkPath)
}

func formatBuiltWith(makeTags string) string {
func formatBuiltWith() string {
var version = runtime.Version()
if len(MakeVersion) > 0 {
version = MakeVersion + ", " + runtime.Version()
Expand Down
7 changes: 0 additions & 7 deletions models/access_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ import (
"github.com/stretchr/testify/assert"
)

var accessModes = []AccessMode{
AccessModeRead,
AccessModeWrite,
AccessModeAdmin,
AccessModeOwner,
}

func TestAccessLevel(t *testing.T) {
assert.NoError(t, PrepareTestDatabase())

Expand Down
Loading