Skip to content

Commit

Permalink
feat: add golangci-lint config
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianLoch committed Feb 16, 2024
1 parent befa10d commit 7704cb7
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
run:
timeout: 3m
skip-dirs:
- hack
- integration

linters:
fast: true
disable-all: true
enable:
- bidichk # checks for dangerous unicode character sequences, see Trojan Source
- errcheck
- govet
- ineffassign
- revive
- staticcheck
- unused
# More specialized linters
- gci
- bodyclose
- exportloopref

linters-settings:
govet:
check-shadowing: true
gci:
sections:
- standard # Captures all standard packages if they do not match another section.
- default # Contains all imports that could not be matched to another section type.
- prefix(github.com/exaring/go-hibp-sync) # Groups all imports with the specified prefix.
tagliatelle:
case:
use-field-name: true
rules:
json: snake
yaml: kebab

issues:
exclude:
- undeclared|could not import|VersionString|ConfigurationName
# too many false positives; see https://github.com/golangci/golangci-lint/issues/166
- declaration of "err" shadows declaration

0 comments on commit 7704cb7

Please sign in to comment.