mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
chore: enable exhaustruct linter (#8403)
* chore: enable exhaustruct linter * add exlusion rules * move to allowlist instead * exhaustruct httpmw package * fixup! exhaustruct httpmw package * make lint * address PR comments
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
# Over time we should try tightening some of these.
|
||||
|
||||
linters-settings:
|
||||
exhaustruct:
|
||||
include:
|
||||
# Gradually extend to cover more of the codebase.
|
||||
- 'httpmw\.\w+'
|
||||
gocognit:
|
||||
min-complexity: 46 # Min code complexity (def 30).
|
||||
|
||||
@@ -195,6 +199,10 @@ issues:
|
||||
# We use assertions rather than explicitly checking errors in tests
|
||||
- errcheck
|
||||
- forcetypeassert
|
||||
- exhaustruct # This is unhelpful in tests.
|
||||
- path: scripts/*
|
||||
linters:
|
||||
- exhaustruct
|
||||
|
||||
fix: true
|
||||
max-issues-per-linter: 0
|
||||
@@ -219,6 +227,7 @@ linters:
|
||||
- errcheck
|
||||
- errname
|
||||
- errorlint
|
||||
- exhaustruct
|
||||
- exportloopref
|
||||
- forcetypeassert
|
||||
- gocritic
|
||||
|
||||
Reference in New Issue
Block a user