Skip to content

Commit

Permalink
fix: Resolve issues in golangci lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sbp-bvanb committed Oct 21, 2024
1 parent 9f845d6 commit f7c63ca
Showing 1 changed file with 23 additions and 79 deletions.
102 changes: 23 additions & 79 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
---
run:
concurrency: 3
timeout: 15m
issues-exit-code: 1
tests: true

skip-dirs:
- data

# list of build tags, all linters use it. Default is empty list

# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: code-climate

# print lines of code with issue, default is true
print-issued-lines: true

# print linter name in the end of issue text, default is true
print-linter-name: true

uniq-by-line: false

# all available settings of specific linters
Expand All @@ -30,12 +22,14 @@ linters-settings:
deny:
- pkg: "github.com/tj/assert"
desc: not allowed, did you mean testify assert?
gci:
local-prefixes: github.com/wimspaargaren/prolayout

errcheck:
check-type-assertions: false
check-foonk: true

gci:
sections:
- standard # Standard section: captures all standard packages.

Check warning on line 30 in .golangci.yml

View workflow job for this annotation

GitHub Actions / mcvs-golang-action

30:18 [comments] too few spaces before comment
- default
- prefix(github.com/wimspaargaren/prolayout)
revive:
ignore-generated-header: true
enable-all-rules: true
Expand Down Expand Up @@ -79,18 +73,10 @@ linters-settings:
disabled: false
arguments:
- "^[a-z][a-z0-9A-Z]{0,}$"
govet:
check-shadowing: false

golint:
min-confidence: 0.8

gofmt:
simplify: true
gocyclo:
min-complexity: 18
maligned:
suggest-new: true
dupl:
threshold: 175
goconst:
Expand All @@ -114,84 +100,42 @@ linters-settings:
lll:
line-length: 200
tab-width: 2
unused:
check-exported: false

unparam:
check-exported: false

nakedret:
max-func-lines: 0
prealloc:
simple: true
range-loops: true # Report preallocation suggestions on range loops, true by default
for-loops: false # Report preallocation suggestions on for loops, false by default
range-loops: true
for-loops: false
gocritic:
disabled-checks:
- regexpMust

enabled-tags:
- performance

settings: # settings passed to gocritic

Check warning on line 116 in .golangci.yml

View workflow job for this annotation

GitHub Actions / mcvs-golang-action

116:15 [comments] too few spaces before comment
captLocal: # must be valid enabled check name

Check warning on line 117 in .golangci.yml

View workflow job for this annotation

GitHub Actions / mcvs-golang-action

117:18 [comments] too few spaces before comment
paramsOnly: true
rangeValCopy:
sizeThreshold: 32

linters:
disable-all: true
enable:
- asciicheck
- bodyclose
- dupl
- errcheck
- errorlint
- exhaustive
- exportloopref
- funlen
- gci
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godox
- gofmt
- gofumpt
- goheader
- revive
- gomodguard
- goprintffuncname
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- nestif
- noctx
- nolintlint
- rowserrcheck
- sqlclosecheck
- staticcheck
- tparallel
- typecheck
- unconvert
- unparam
- whitespace
- dogsled
- godot
- goerr113
- goimports
- lll
- prealloc
- testpackage
- depguard

enable-all: true
disable:
- errname
- execinquery # deprecated (since v1.58.0)

Check warning on line 126 in .golangci.yml

View workflow job for this annotation

GitHub Actions / mcvs-golang-action

126:19 [comments] too few spaces before comment
- exhaustruct
- exportloopref # deprecated (since v1.60.2)

Check warning on line 128 in .golangci.yml

View workflow job for this annotation

GitHub Actions / mcvs-golang-action

128:21 [comments] too few spaces before comment
- gomnd # deprecated (since v1.58.0)

Check warning on line 129 in .golangci.yml

View workflow job for this annotation

GitHub Actions / mcvs-golang-action

129:13 [comments] too few spaces before comment
- nilnil
- nlreturn
- paralleltest
- varnamelen
- wsl

fast: false

severity:
severity:
default-severity: error
rules:
- linters:
Expand Down

0 comments on commit f7c63ca

Please sign in to comment.