Skip to content

Commit

Permalink
Update linter settings
Browse files Browse the repository at this point in the history
* Remove old deprecated linters
* Add new deprecated linters
* disable annoying style rules
  • Loading branch information
Bios-Marcel committed Nov 10, 2024
1 parent 07e0060 commit 754a522
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
linters:
enable-all: true
disable:
## These are all deprecated
- golint
- ifshort
- exhaustivestruct
- deadcode
- nosnakecase
- varcheck
- interfacer
- maligned
- structcheck
- scopelint
## These are deprecated
- execinquery
- exportloopref
- gomnd

## These are too strict for our taste
# Whitespace linter
- wsl
# Demands a newline before each return
- nlreturn
# Magic numbers
- gomnd
- mnd
# function, line and variable length
- funlen
- lll
Expand All @@ -46,7 +39,11 @@ linters:
# Requires certain types of tags, such as json or mapstructure.
# While very useful, I don't care right now.
- musttag
- goerr113
# Not wrapping errors
- err113
- wrapcheck
# Code duplications
- dupl

## Provides no real value
- testifylint
Expand All @@ -64,12 +61,24 @@ linters-settings:
# This has false positives and provides little value.
- ifElseChain

revive:
rules:
- name: var-naming
disabled: true

stylecheck:
checks: ["all", "-ST1003"]

run:
skip-files:
exclude-files:
- ".*_easyjson.go"

issues:
exclude-rules:
- path: translations\\[^e][^n].*?\.go
linters:
# Too many potential false positives
- misspell
# Exclude some linters from running on tests files. In tests, we often have
# code that is rather unsafe and only has one purpose, or furthermore things
# that indicate an issue in production, but are fine for testing only small
Expand Down

0 comments on commit 754a522

Please sign in to comment.