-
-
Notifications
You must be signed in to change notification settings - Fork 997
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Adding strict lint * fix: Bumping up to a medium instance
- Loading branch information
Showing
4 changed files
with
133 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
run: | ||
timeout: 2m | ||
issues-exit-code: 1 | ||
tests: true | ||
go: "1.22" | ||
output: | ||
formats: | ||
- format: colored-line-number | ||
print-issued-lines: true | ||
print-linter-name: true | ||
|
||
linters-settings: | ||
staticcheck: | ||
checks: | ||
- all | ||
- '-SA9005' | ||
errcheck: | ||
check-type-assertions: false | ||
check-blank: false | ||
exclude-functions: | ||
- (*os.File).Close | ||
errorlint: | ||
errorf: true | ||
asserts: true | ||
comparison: true | ||
gofmt: | ||
simplify: true | ||
dupl: | ||
threshold: 120 | ||
goconst: | ||
min-len: 3 | ||
min-occurrences: 5 | ||
revive: | ||
min-confidence: 0.8 | ||
unused: | ||
check-exported: false | ||
unparam: | ||
check-exported: false | ||
nakedret: | ||
max-func-lines: 20 | ||
gocritic: | ||
disabled-checks: | ||
- regexpMust | ||
- rangeValCopy | ||
- appendAssign | ||
- hugeParam | ||
enabled-tags: | ||
- performance | ||
disabled-tags: | ||
- experimental | ||
|
||
linters: | ||
enable: | ||
- dupl | ||
- errcheck | ||
- goconst | ||
- gocritic | ||
- goimports | ||
- mnd | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- misspell | ||
- unconvert | ||
- unused | ||
- unparam | ||
enable-all: false | ||
disable: | ||
- depguard | ||
- gosec | ||
- gocyclo | ||
- exhaustruct | ||
fast: false | ||
mnd: | ||
ignored-functions: strconv.Format*,os.*,strconv.Parse*,strings.SplitN,bytes.SplitN | ||
presets: | ||
- bugs | ||
- performance | ||
- unused | ||
- test | ||
# These two are only in the strict lint right now | ||
- style | ||
- complexity | ||
|
||
issues: | ||
exclude-dirs: | ||
- docs | ||
- _ci | ||
- .github | ||
- .circleci | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- dupl | ||
- gocyclo | ||
- lll | ||
- errcheck | ||
- wsl | ||
- mnd | ||
- unparam | ||
|
||
exclude-use-default: false | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,10 +44,13 @@ install-lint: | |
run-lint: | ||
golangci-lint run -v --timeout=5m ./... | ||
|
||
run-strict-lint: | ||
golangci-lint run -v --timeout=5m -c .strict.golangci.yml --new-from-rev origin/master ./... | ||
|
||
install-mockery: | ||
go install github.com/vektra/mockery/[email protected] | ||
|
||
generate-mocks: | ||
go generate ./... | ||
|
||
.PHONY: help fmtcheck fmt install-fmt-hook clean install-lint run-lint | ||
.PHONY: help fmtcheck fmt install-fmt-hook clean install-lint run-lint run-strict-lint |