mirror of
1
Fork 0
forgejo/services/repository
silverwind 6582f0029b
Add `lint-go-gopls` (#30729)
Uses `gopls check <files>` as a linter. Tested locally and brings up 149
errors currently for me. I don't think I want to fix them in this PR,
but I would like at least to get this analysis running on CI.

List of errors:
```
modules/indexer/code/indexer.go:181:11: impossible condition: nil != nil
routers/private/hook_post_receive.go:120:15: tautological condition: nil == nil
services/auth/source/oauth2/providers.go:185:9: tautological condition: nil == nil
services/convert/issue.go:216:11: tautological condition: non-nil != nil
tests/integration/git_test.go:332:9: impossible condition: nil != nil
services/migrations/migrate.go:179:24-43: unused parameter: ctx
services/repository/transfer.go:288:48-69: unused parameter: doer
tests/integration/api_repo_tags_test.go:75:41-61: unused parameter: session
tests/integration/git_test.go:696:64-74: unused parameter: baseBranch
tests/integration/gpg_git_test.go:265:27-39: unused parameter: t
tests/integration/gpg_git_test.go:284:23-29: unused parameter: tmpDir
tests/integration/gpg_git_test.go:284:31-35: unused parameter: name
tests/integration/gpg_git_test.go:284:37-42: unused parameter: email
```

(cherry picked from commit 816222243af523316041692622be6f48ef068693)

Conflicts:
	Makefile
	trivial context conflict and also ask renovate to watch over it
	do not include it in lint-backend because the errors are not fixed
2024-06-09 11:13:39 +02:00
..
archiver Count downloads for tag archives 2024-04-08 12:51:27 +02:00
commitstatus Fix automerge will not work because of some events haven't been triggered (#30780) 2024-05-26 19:01:36 +02:00
files Resolve lint for unused parameter and unnecessary type arguments (#30750) 2024-05-05 08:38:16 +01:00
adopt.go Fix incorrect default branch when adopt a repository (#30912) 2024-05-12 20:03:10 +02:00
adopt_test.go Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
avatar.go Improve avatar uploading / resizing / compressing, remove Fomantic card module (#24653) 2023-05-13 20:59:11 +02:00
avatar_test.go Use context parameter in services/repository (#23186) 2023-02-28 16:17:51 -06:00
branch.go Fix push multiple branches error with tests (#31151) 2024-06-02 20:39:42 +02:00
cache.go Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
check.go Update tool dependencies (#29030) 2024-02-02 19:11:39 -05:00
collaboration.go Fix `DeleteCollaboration` transaction behaviour (#28886) 2024-01-22 07:19:56 +00:00
collaboration_test.go Next round of `db.DefaultContext` refactor (#27089) 2023-09-16 14:39:12 +00:00
commit.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
contributors_graph.go Add codespell support and fix a good number of typos with its help (#3270) 2024-05-09 13:49:37 +00:00
contributors_graph_test.go [BUG] Store JSON in contributors commit cache 2024-04-11 13:01:33 +02:00
create.go Move get/set default branch from git package to gitrepo package to hide repopath (#29126) 2024-03-11 23:36:59 +07:00
create_test.go [CLEANUP] make golangci-lint@v1.56.1 happy 2024-02-15 16:19:36 +01:00
delete.go mysql: use inner join for hook_task deletion 2024-05-24 10:31:41 +02:00
fork.go Allow admins to fork repos even when creation limits are exhausted (#3277) 2024-04-17 05:52:02 +00:00
fork_test.go Add option to prohibit fork if user reached maximum limit of repositories (#21848) 2022-12-27 15:21:14 -06:00
generate.go cleanup(services): xstrings v1.5.0 the CAMEL & PASCAL workarounds 2024-06-07 18:10:37 +02:00
generate_test.go Move generate from module to service (#29465) 2024-03-06 12:10:44 +08:00
hooks.go Simplify how git repositories are opened (#28937) 2024-01-27 21:09:51 +01:00
init.go Move generate from module to service (#29465) 2024-03-06 12:10:44 +08:00
lfs.go Refactor LFS GC functions 2024-04-05 16:49:15 +02:00
lfs_test.go test: LFS gc should not delete all metadata objects 2024-04-26 10:16:59 +02:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
migrate.go Move get/set default branch from git package to gitrepo package to hide repopath (#29126) 2024-03-11 23:36:59 +07:00
push.go Do not update PRs based on events that happened before they existed 2024-04-11 11:16:23 +02:00
repository.go Merge branch 'forgejo' into forgejo-federated-pr5 2024-05-29 18:26:16 +02:00
repository_test.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
review.go Use context parameter in services/repository (#23186) 2023-02-28 16:17:51 -06:00
review_test.go Use context parameter in services/repository (#23186) 2023-02-28 16:17:51 -06:00
setting.go Fix an actions schedule bug (#28942) 2024-03-25 16:27:32 +01:00
star.go feat(federated-star) star repositories via ActivityPub (#1680) 2024-06-06 08:58:11 +02:00
template.go Move generate from module to service (#29465) 2024-03-06 12:10:44 +08:00
transfer.go Add `lint-go-gopls` (#30729) 2024-06-09 11:13:39 +02:00
transfer_test.go [MODERATION] User blocking 2024-02-05 15:56:45 +01:00