@@ -34,37 +34,36 @@ linters:
3434 # - unparam # Reports unused function parameters
3535 - unused # (megacheck) Checks Go code for unused constants, variables, functions and types
3636 disable :
37- - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
38- - depguard # Go linter that checks if package imports are in a list of acceptable packages
39- - dogsled # Checks assignments with too many blank identifiers # (e.g. x, _, _, _, := f())
40- - err113 # Golang linter to check the errors handling expressions
41- - funlen # Tool for detection of long functions
42- - gochecknoglobals # Checks that no globals are present in Go code
43- - gochecknoinits # Checks that no init functions are present in Go code
44- - gocognit # Computes and checks the cognitive complexity of functions
45- - gocyclo # Computes and checks the cyclomatic complexity of functions
46- - godot # Check if comments end in a period
47- - godox # Tool for detection of FIXME, TODO and other comment keywords
48- - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
49- - gomodguard # Allow and block list linter for direct Go module dependencies.
50- - lll # Reports long lines
51- - nestif # Reports deeply nested if statements
52- - nolintlint # Reports ill-formed or insufficient nolint directives
53- - rowserrcheck # checks whether Err of rows is checked successfully
54- - stylecheck # Stylecheck is a replacement for golint
55- - testpackage # linter that makes you use a separate _test package
56- - whitespace # Tool for detection of leading and trailing whitespace
57- - wsl # Whitespace Linter - Forces you to use empty lines!
37+ # - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
38+ # - depguard # Go linter that checks if package imports are in a list of acceptable packages
39+ # - dogsled # Checks assignments with too many blank identifiers # (e.g. x, _, _, _, := f())
40+ # - err113 # Golang linter to check the errors handling expressions
41+ # - funlen # Tool for detection of long functions
42+ # - gochecknoglobals # Checks that no globals are present in Go code
43+ # - gochecknoinits # Checks that no init functions are present in Go code
44+ # - gocognit # Computes and checks the cognitive complexity of functions
45+ # - gocyclo # Computes and checks the cyclomatic complexity of functions
46+ # - godot # Check if comments end in a period
47+ # - godox # Tool for detection of FIXME, TODO and other comment keywords
48+ # - gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
49+ # - gomodguard # Allow and block list linter for direct Go module dependencies.
50+ # - lll # Reports long lines
51+ # - nestif # Reports deeply nested if statements
52+ # - rowserrcheck # checks whether Err of rows is checked successfully
53+ # - stylecheck # Stylecheck is a replacement for golint
54+ # - testpackage # linter that makes you use a separate _test package
55+ # - whitespace # Tool for detection of leading and trailing whitespace
56+ # - wsl # Whitespace Linter - Forces you to use empty lines!
5857 # Once fixed, should enable
59- - dupl # Tool for code clone detection
60- - goconst # Finds repeated strings that could be replaced by a constant
61- - goprintffuncname # Checks that printf-like functions are named with `f` at the end
62- - gosec # (gas) Inspects source code for security problems
58+ # - dupl # Tool for code clone detection
59+ # - goconst # Finds repeated strings that could be replaced by a constant
60+ # - goprintffuncname # Checks that printf-like functions are named with `f` at the end
61+ # - gosec # (gas) Inspects source code for security problems
6362 - gosimple # (megacheck) Linter for Go source code that specializes in simplifying a code
64- - nakedret # Finds naked returns in functions greater than a specified function length
65- - prealloc # Finds slice declarations that could potentially be preallocated
66- - revive # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
67- - unparam # Reports unused function parameters
63+ # - nakedret # Finds naked returns in functions greater than a specified function length
64+ # - prealloc # Finds slice declarations that could potentially be preallocated
65+ # - revive # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
66+ # - unparam # Reports unused function parameters
6867
6968# Don't enable fieldalignment, changing the field alignment requires checking to see if anyone uses constructors
7069# without names. If there is a memory issue on a specific field, that is best found with a heap profile.
@@ -76,7 +75,9 @@ linters:
7675# Disable goconst in test files, often we have duplicated strings across tests, but don't make sense as constants.
7776issues :
7877 exclude-rules :
79- - path : (_test\.go|utilities_testing\.go)
78+ # cover _testing.go (utility testing files) and _test.go files
79+ # base/util_testing.go / rest/utilities_testing\.*.go
80+ - path : (_test.*\.go)
8081 linters :
8182 - goconst
8283 - path : rest/debug.go
@@ -104,4 +105,5 @@ linters-settings:
104105 - wrapperFunc
105106 settings :
106107 ruleguard :
107- rules : ' ${configDir}/ruleguard/*.go'
108+ rules : ' ${configDir}/ruleguard/rules-*.go'
109+ failOn : all
0 commit comments