committed by
techknowlogick
147 changed files with 1046 additions and 774 deletions
-
6.drone.yml
-
97.golangci.yml
-
11Makefile
-
2cmd/admin.go
-
21cmd/cert.go
-
7cmd/serv.go
-
9cmd/web.go
-
3contrib/pr/checkout.go
-
2integrations/branches_test.go
-
6integrations/editor_test.go
-
11integrations/integration_test.go
-
2integrations/lfs_getobject_test.go
-
15integrations/migration-test/migration_test.go
-
2integrations/testlogger.go
-
6main.go
-
7models/access_test.go
-
8models/branches.go
-
4models/git_blame.go
-
13models/git_diff.go
-
6models/git_diff_test.go
-
11models/issue.go
-
17models/issue_comment.go
-
38models/issue_comment_list.go
-
8models/issue_label.go
-
125models/issue_list.go
-
17models/log.go
-
21models/login_source.go
-
7models/mail.go
-
8models/migrations/migrations.go
-
4models/migrations/v27.go
-
3models/migrations/v78.go
-
3models/migrations/v85.go
-
9models/models.go
-
5models/notification.go
-
5models/oauth2.go
-
7models/oauth2_application.go
-
17models/org.go
-
31models/org_team.go
-
6models/org_test.go
-
25models/pull.go
-
6models/pull_test.go
-
14models/release.go
-
32models/repo.go
-
2models/repo_activity.go
-
12models/repo_branch.go
-
2models/repo_collaboration.go
-
26models/repo_list.go
-
15models/repo_redirect.go
-
10models/ssh_key.go
-
12models/status.go
-
4models/token_test.go
-
4models/update.go
-
29models/user.go
-
2models/user_mail.go
-
4models/user_openid_test.go
-
8models/webhook.go
-
2models/webhook_discord.go
-
12models/wiki.go
-
12modules/auth/auth.go
-
3modules/auth/oauth2/oauth2.go
-
2modules/auth/openid/discovery_cache_test.go
-
2modules/auth/user_form.go
-
28modules/base/tool.go
-
15modules/base/tool_test.go
-
12modules/cache/cache.go
-
3modules/context/context.go
-
2modules/context/pagination.go
-
14modules/context/repo.go
-
6modules/git/blob.go
-
7modules/git/commit.go
-
10modules/git/commit_info.go
-
12modules/git/repo.go
-
7modules/git/repo_branch.go
-
5modules/git/repo_commit.go
-
8modules/git/repo_compare.go
-
7modules/git/repo_tag.go
-
8modules/git/utils.go
-
6modules/gzip/gzip.go
-
35modules/httplib/httplib.go
-
17modules/indexer/indexer.go
-
13modules/indexer/issues/indexer.go
-
6modules/indexer/issues/queue_channel.go
-
4modules/indexer/issues/queue_disk.go
-
4modules/indexer/issues/queue_redis.go
-
17modules/lfs/locks.go
-
12modules/lfs/server.go
-
8modules/log/colors.go
-
5modules/log/conn.go
-
1modules/log/conn_test.go
-
4modules/log/event.go
-
4modules/log/file.go
-
8modules/log/file_test.go
-
2modules/log/flags.go
-
2modules/log/log.go
-
4modules/log/smtp.go
-
5modules/log/writer.go
-
15modules/mailer/mailer.go
-
34modules/markup/html.go
-
5modules/markup/html_internal_test.go
-
9modules/notification/ui/ui.go
@ -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`' |