Skip to content

Commit

Permalink
Add golangci lint config
Browse files Browse the repository at this point in the history
  • Loading branch information
behzadsh committed Dec 31, 2022
1 parent c3406a5 commit 9093d4a
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
run:
deadline: 5m

linters-settings:
errcheck:
check-type-assertions: true
check-blank: false
govet:
check-shadowing: true
gci:
sections:
- standard
- default
- prefix( github.com/behzadsh/go.validator)
- blank
- dot
godot:
capital: true
gofumpt:
extra-rules: true
revive:
enable-all-rules: true
rules:
- name: add-constant
disabled: true
- name: argument-limit
disabled: true
- name: banned-characters
disabled: true
- name: cognitive-complexity
disabled: true
- name: cyclomatic
disabled: true
- name: file-header
disabled: true
- name: function-length
disabled: true
- name: function-result-limit
arguments: [2]
- name: line-length-limit
disabled: false
arguments: [120]
- name: max-public-structs
disabled: true
- name: package-comments
disabled: true
- name: unhandled-error
arguments:
- "fmt.Printf"
- "fmt.Println"
- "fmt.Print"
misspell:
locale: US
ignore-words:
- behzadsh
nolintlint:
require-explanation: true
require-specific: true
gocyclo:
min-complexity: 15
gocognit:
min-complexity: 15

linters:
enable-all: false
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- unused
- errname
- gci
- gocyclo
- gocognit
- godot
- gofumpt
- gosec
- revive
- misspell
- prealloc
- unconvert
- nolintlint

0 comments on commit 9093d4a

Please sign in to comment.