mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-10 05:24:18 +09:00
chore: update and relax revive naming rules (#38615)
- enable `skip-initialism-name-checks`, so names like `sessionUid` are allowed - replace removed `skip-package-name-checks` option with new `package-naming` with fitting rules for gitea - drop dead exclusion paths
This commit is contained in:
+6
-4
@@ -87,6 +87,11 @@ linters:
|
||||
- name: increment-decrement
|
||||
- name: modifies-value-receiver
|
||||
- name: package-comments
|
||||
- name: package-naming
|
||||
arguments:
|
||||
- convention-name-check-regex: '^[a-z][a-z0-9_]*$' # underscores are used by migration packages
|
||||
skip-default-bad-name-check: true
|
||||
skip-collision-with-common-std: true
|
||||
- name: redefines-builtin-id
|
||||
- name: superfluous-else
|
||||
- name: time-naming
|
||||
@@ -96,7 +101,7 @@ linters:
|
||||
arguments:
|
||||
- [] # AllowList - do not remove as args for the rule are positional and won't work without lists first
|
||||
- [] # DenyList
|
||||
- - skip-package-name-checks: true # supress errors from underscore in migration packages
|
||||
- - skip-initialism-name-checks: true
|
||||
staticcheck:
|
||||
checks:
|
||||
- all
|
||||
@@ -158,9 +163,6 @@ linters:
|
||||
- .venv
|
||||
- public
|
||||
- web_src
|
||||
- third_party$
|
||||
- builtin$
|
||||
- examples$
|
||||
issues:
|
||||
max-issues-per-linter: 0
|
||||
max-same-issues: 0
|
||||
|
||||
Reference in New Issue
Block a user