summaryrefslogtreecommitdiffstats
path: root/.golangci.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.golangci.yaml')
-rw-r--r--.golangci.yaml99
1 files changed, 99 insertions, 0 deletions
diff --git a/.golangci.yaml b/.golangci.yaml
new file mode 100644
index 0000000..68de2c5
--- /dev/null
+++ b/.golangci.yaml
@@ -0,0 +1,99 @@
+---
+version: "2"
+linters:
+ default: none
+ enable:
+ - asciicheck
+ - errcheck
+ - govet
+ - ineffassign
+ - misspell
+ - nolintlint
+ - revive
+ - staticcheck
+ - unused
+ settings:
+ staticcheck:
+ checks:
+ - all
+ - '-ST1000' # disable the rule SA1000 pkg comment
+ - '-ST1003' # disable the rule SA1003 ALL_CAPS VARS
+ - '-ST1005' # disable the rule SA1005 error strings should not be capitalized
+ - '-ST1020' # Exported methods comment style
+ - '-ST1021' # Exported methods comment style
+ - '-ST1022' # Exported methods comment style
+ revive:
+ confidence: 0.8
+ severity: warning
+ enable-all-rules: true
+ rules:
+ - name: cyclomatic
+ arguments:
+ - 7
+ - name: cognitive-complexity
+ arguments:
+ - 9
+ - name: argument-limit
+ arguments:
+ - 5
+ - name: line-length-limit
+ arguments:
+ - 120
+ - name: function-length
+ arguments:
+ - 20
+ - 0
+ - name: function-result-limit
+ arguments:
+ - 3
+ - name: var-naming
+ arguments:
+ - []
+ - []
+ - - upperCaseConst: true
+ disabled: true
+ - name: add-constant
+ disabled: true
+ - name: max-public-structs
+ disabled: true
+ - name: banned-characters
+ disabled: true
+ - name: package-comments
+ disabled: true
+ - name: file-header
+ disabled: true
+ - name: exported
+ disabled: true
+ exclusions:
+ generated: lax
+ rules:
+ - linters:
+ - line-length-limit
+ - revive
+ path: _test\.go
+ - linters:
+ - revive
+ text: 'unused-parameter: parameter \S+ seems to be unused, consider removing or renaming it as _'
+ - linters:
+ - revive
+ text: 'empty-block: this block is empty, you can remove it'
+ - linters:
+ - errcheck
+ path: _test\.go
+ text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Unset|Set)?env)|afero.WriteFile. is not checked
+ paths:
+ - third_party$
+ - builtin$
+ - examples$
+issues:
+ max-issues-per-linter: 0
+ max-same-issues: 0
+formatters:
+ enable:
+ - gofumpt
+ exclusions:
+ generated: lax
+ paths:
+ - third_party$
+ - builtin$
+ - examples$