@@ -229,6 +229,7 @@ lll: Reports long lines [fast: true, auto-fix: false]
229229maligned: Tool to detect Go structs that would take less memory if their fields were sorted [fast: true, auto-fix: false]
230230misspell: Finds commonly misspelled English words in comments [fast: true, auto-fix: true]
231231nakedret: Finds naked returns in functions greater than a specified function length [fast: true, auto-fix: false]
232+ nestif: Reports deeply nested if statements [fast: true, auto-fix: false]
232233prealloc: Finds slice declarations that could potentially be preallocated [fast: true, auto-fix: false]
233234rowserrcheck: checks whether Err of rows is checked successfully [fast: true, auto-fix: false]
234235scopelint: Scopelint checks for unpinned variables in go programs [fast: true, auto-fix: false]
@@ -492,6 +493,7 @@ golangci-lint help linters
492493- [gomodguard](https://github.com/ryancurrah/gomodguard) - Allow and block list linter for direct Go module dependencies.
493494- [godot](https://github.com/tetafro/godot) - Check if comments end in a period
494495- [testpackage](https://github.com/maratori/testpackage) - linter that makes you use a separate _test package
496+ - [nestif](https://github.com/nakabonne/nestif) - Reports deeply nested if statements
495497
496498## Configuration
497499
@@ -710,6 +712,9 @@ linters-settings:
710712 gocognit:
711713 # minimal code complexity to report, 30 by default (but we recommend 10 -20 )
712714 min-complexity: 10
715+ nestif:
716+ # minimal complexity of if statements to report, 5 by default
717+ min-complexity: 4
713718 goconst:
714719 # minimal length of string constant, 3 by default
715720 min-len: 3
@@ -777,8 +782,8 @@ linters-settings:
777782 modules: # List of blocked modules
778783 # - github.com/uudashr/go-module: # Blocked module
779784 # recommendations: # Recommended modules that should be used instead (Optional)
780- # - golang.org/x/mod
781- # reason: "`mod` is the official go.mod parser library." # Reason why the recommended module should be used (Optional)
785+ # - golang.org/x/mod
786+ # reason: "`mod` is the official go.mod parser library." # Reason why the recommended module should be used (Optional)
782787 govet:
783788 # report about shadowed variables
784789 check-shadowing: true
@@ -1288,6 +1293,7 @@ Thanks to developers and authors of used linters:
12881293- [ryancurrah](https://github.com/ryancurrah)
12891294- [tetafro](https://github.com/tetafro)
12901295- [maratori](https://github.com/maratori)
1296+ - [nakabonne](https://github.com/nakabonne)
12911297
12921298## Changelog
12931299
0 commit comments