Commit 3adf8f75
3adf8f7522c1Merged
Svyatoslav Dumchenko <[email protected]> · 4 years ago · 8 files · ~8 modified
Description
Fix linter issues
Details
- Commit
- 3adf8f7522c1
- Parent
- cf9c8d4ff56f
.golangci.ymlmodifiedView file
@@ -4,27 +4,26 @@
44
build-tags:55
- integration66
7+
output:8+
# sorts results by: filepath, line and column9+
sort-results: true10+
711
linters:812
enable-all: true913
disable:10-
- cyclop11-
- funlen12-
- gci1314
- gochecknoglobals # TODO: get rid of globals14-
- gocognit15-
- gocyclo16-
- godox17-
- goerr11315+
- gocyclo # we use cyclop16+
- godox # TODO: get rid of TODOs17+
- goerr113 # need to create wrapped static errors1818
- goimports # we already lint with gofumpt1919
- golint # deprecated2020
- gomnd # we want to keep magic numbers21-
- ifshort2221
- interfacer # deprecated2322
- maligned # deprecated23+
- revive # we need a lot of documentation for exported things2424
- scopelint # deprecated25-
- tagliatelle26-
- varnamelen27-
- wrapcheck25+
- varnamelen # I don't think short names are bad26+
- wrapcheck # TODO: need to wrap all external errors into our own2827
- wsl # lots of style checks2928
3029
# all available settings of specific linters@@ -32,11 +31,11 @@
3231
3332
cyclop:3433
# the maximal code complexity to report35-
max-complexity: 1034+
max-complexity: 203635
# the maximal average package complexity. If it's higher than 0.0 (float) the check is enabled (default 0.0)3736
package-average: 0.03837
# should ignore tests (default false)39-
skip-tests: false38+
skip-tests: true4039
4140
dogsled:4241
# checks assignments with too many blank identifiers; default is 2@@ -99,7 +98,7 @@
9998
10099
gocognit:101100
# minimal code complexity to report, 30 by default (but we recommend 10-20)102-
min-complexity: 10101+
min-complexity: 20103102
104103
nestif:105104
# minimal complexity of if statements to report, 5 by default@@ -161,10 +160,6 @@
161160
# whether to check exported functions162161
checkExported: true163162
164-
gocyclo:165-
# minimal code complexity to report, 30 by default (but we recommend 10-20)166-
min-complexity: 10167-
168163
gofmt:169164
# simplify code: gofmt with `-s` option, true by default170165
simplify: true@@ -315,6 +310,16 @@
315310
# https://staticcheck.io/docs/options#http_status_code_whitelist316311
http-status-code-whitelist: [ "200", "400", "404", "500" ]317312
313+
tagliatelle:314+
# check the struck tag name case315+
case:316+
# use the struct field name to check the name of the struct tag317+
use-field-name: false318+
rules:319+
# any struct tag type can be used.320+
# support string case: `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`321+
yaml: snake322+
318323
testpackage:319324
# regexp pattern to skip files320325
skip-regexp: (export|internal)_test\.go@@ -349,6 +354,27 @@
349354
multi-if: false # Enforces newlines (or comments) after every multi-line if statement350355
multi-func: false # Enforces newlines (or comments) after every multi-line function signature351356
357+
issues:358+
# Independently from option `exclude` we use default exclude patterns,359+
# it can be disabled by this option. To list all360+
# excluded by default patterns execute `golangci-lint run --help`.361+
# Default value for this option is true.362+
exclude-use-default: false363+
364+
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.365+
max-issues-per-linter: 0366+
367+
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.368+
max-same-issues: 0369+
370+
# Show only new issues: if there are unstaged changes or untracked files,371+
# only those changes are analyzed, else only changes in HEAD~ are analyzed.372+
# It's a super-useful option for integration of golangci-lint into existing373+
# large codebase. It's not practical to fix all existing issues at the moment374+
# of integration: much better don't allow issues in new code.375+
# Default is false.376+
new: false377+
352378
severity:353379
# Default value is empty string.354380
# Set the default severity for issues. If severity rules are defined and the issues@@ -363,3 +389,13 @@
363389
# The default value is false.364390
# If set to true severity-rules regular expressions become case sensitive.365391
case-sensitive: false392+
393+
# Default value is empty list.394+
# When a list of severity rules are provided, severity information will be added to lint395+
# issues. Severity rules have the same filtering capability as exclude rules except you396+
# are allowed to specify one matcher per severity rule.397+
# Only affects out formats that support setting severity information.398+
rules:399+
- linters:400+
- godox401+
severity: noticecmd/helmwave/main.gomodifiedView file
Loading diff…
pkg/helper/helm.gomodifiedView file
Loading diff…
pkg/helper/http.gomodifiedView file
Loading diff…
pkg/helper/yml.gomodifiedView file
Loading diff…
pkg/kubedog/multitrack.gomodifiedView file
Loading diff…
pkg/template/extra.gomodifiedView file
Loading diff…
pkg/template/tpl2yml.gomodifiedView file
Loading diff…