Skip to content

Commit

Permalink
new linters added
Browse files Browse the repository at this point in the history
  • Loading branch information
ivvist committed Feb 5, 2024
1 parent 12ab94f commit 7f9d34c
Showing 1 changed file with 50 additions and 3 deletions.
53 changes: 50 additions & 3 deletions scripts/.golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# options for analysis running
# https://golangci-lint.run/usage/linters/

linters:
disable-all: true
enable:
Expand All @@ -9,22 +11,55 @@ linters:
- stylecheck
- misspell
- errcheck
- bidichk

# First stage linters
- asciicheck # Checks that all code identifiers does not have non-ASCII symbols in the name
- durationcheck # Check for two durations multiplied together
- gochecknoinits # Checks that no init functions are present in Go code.
- gomnd

# Second stage linters
# - unconvert # Remove unnecessary type conversions.
# - predeclared # Find code that shadows one of Go's predeclared identifiers.
# - mirror # Reports wrong mirror patterns of bytes/strings usage.
# - nilerr # Finds the code that returns nil even if it checks that the error is not nil.
# - testifylint # Checks usage of github.com/stretchr/testify.


# For the future:
#------------------------------------
# - testpackage
# - prealloc
# - perfsprint
# - nonamedreturns
# - noctx
# - nilnil
#? - nestif
# - musttag
# - makezero
# - inamedparam
# - goerr113
# - godox #- searches FixMe,TODO in code
# - gocritic
# - forbidigo
# - exportloopref
# - exhaustruct
# - errorlint
# - goconst
# - unparam
#------------------------------------
fast: true
linters-settings:
gosec:
excludes:
- G101
- G601
- G602
stylecheck:
checks: [ "all", "-ST1003", "-ST1023", "-ST1022" ]
staticcheck:
checks: [ "all", "-SA1019"]
stylecheck:
checks: [ "all", "-ST1003", "-ST1023" ]
unparam:
check-exported: true
misspell:
Expand All @@ -44,6 +79,19 @@ linters-settings:
allowStrs: '""'
allowInts: "0,1,2"
allowFloats: "0.0,0.,1.0,1.,2.0,2."
gomnd:
ignored-files:
- "pkg/vit/consts.go"
ignored-numbers:
- "0"
- "1"
- "2"
- "3"
- "4"
- "5"
- "10"
- "42"
- "100"
issues:
exclude:
- underscore
Expand All @@ -55,4 +103,3 @@ issues:
- gosec
- errcheck
- forcetypeassert

0 comments on commit 7f9d34c

Please sign in to comment.