mirror of
https://github.com/foomo/contentserver.git
synced 2025-10-16 12:25:44 +00:00
59 lines
4.3 KiB
YAML
59 lines
4.3 KiB
YAML
run:
|
|
timeout: 5m
|
|
|
|
linters-settings:
|
|
gocritic:
|
|
disabled-checks:
|
|
- ifElseChain
|
|
- commentFormatting
|
|
|
|
linters:
|
|
enable:
|
|
# Enabled by default linters:
|
|
- errcheck
|
|
- gosimple
|
|
- govet
|
|
- ineffassign
|
|
- staticcheck
|
|
|
|
# Disabled by default linters:
|
|
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers [fast: true, auto-fix: false]
|
|
- bidichk # Checks for dangerous unicode character sequences [fast: true, auto-fix: false]
|
|
#- dupl # Tool for code clone detection [fast: true, auto-fix: false]
|
|
- forcetypeassert # finds forced type assertions [fast: true, auto-fix: false]
|
|
#- gochecknoinits # Checks that no init functions are present in Go code [fast: true, auto-fix: false]
|
|
#- goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false]
|
|
- gocritic # Provides diagnostics that check for bugs, performance and style issues. [fast: false, auto-fix: false]
|
|
- goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt. [fast: true, auto-fix: true]
|
|
#- gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod. [fast: true, auto-fix: false]
|
|
- gomodguard # Allow and block list linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations. [fast: true, auto-fix: false]
|
|
- goprintffuncname # Checks that printf-like functions are named with `f` at the end [fast: true, auto-fix: false]
|
|
- gosec # (gas): Inspects source code for security problems [fast: false, auto-fix: false]
|
|
- grouper # An analyzer to analyze expression groups. [fast: true, auto-fix: false]
|
|
- importas # Enforces consistent import aliases [fast: false, auto-fix: false]
|
|
#- maintidx # maintidx measures the maintainability index of each function. [fast: true, auto-fix: false]
|
|
#- makezero # Finds slice declarations with non-zero initial length [fast: false, auto-fix: false]
|
|
- misspell # Finds commonly misspelled English words in comments [fast: true, auto-fix: true]
|
|
- nakedret # Finds naked returns in functions greater than a specified function length [fast: true, auto-fix: false]
|
|
#- nestif # Reports deeply nested if statements [fast: true, auto-fix: false]
|
|
- nilerr # Finds the code that returns nil even if it checks that the error is not nil. [fast: false, auto-fix: false]
|
|
- nilnil # Checks that there is no simultaneous return of `nil` error and an invalid value. [fast: false, auto-fix: false]
|
|
- noctx # noctx finds sending http request without context.Context [fast: false, auto-fix: false]
|
|
- nolintlint # Reports ill-formed or insufficient nolint directives [fast: true, auto-fix: false]
|
|
#- nonamedreturns # Reports all named returns [fast: false, auto-fix: false]
|
|
- nosprintfhostport # Checks for misuse of Sprintf to construct a host with port in a URL. [fast: true, auto-fix: false]
|
|
- prealloc # Finds slice declarations that could potentially be pre-allocated [fast: true, auto-fix: false]
|
|
- predeclared # find code that shadows one of Go's predeclared identifiers [fast: true, auto-fix: false]
|
|
- promlinter # Check Prometheus metrics naming via promlint [fast: true, auto-fix: false]
|
|
#- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint. [fast: false, auto-fix: false]
|
|
#- tagliatelle # Checks the struct tags. [fast: true, auto-fix: false]
|
|
#- testpackage # linter that makes you use a separate _test package [fast: true, auto-fix: false]
|
|
- thelper # thelper detects golang test helpers without t.Helper() call and checks the consistency of test helpers [fast: false, auto-fix: false]
|
|
- unconvert # Remove unnecessary type conversions [fast: false, auto-fix: false]
|
|
- unparam # Reports unused function parameters [fast: false, auto-fix: false]
|
|
- usestdlibvars # A linter that detect the possibility to use variables/constants from the Go standard library. [fast: true, auto-fix: false]
|
|
- wastedassign # wastedassign finds wasted assignment statements. [fast: false, auto-fix: false]
|
|
- whitespace # Tool for detection of leading and trailing whitespace [fast: true, auto-fix: true]
|
|
disable:
|
|
- unused
|