Skip to content

Commit

Permalink
varnamelen: explicit default values (golangci#2496)
Browse files Browse the repository at this point in the history
  • Loading branch information
butuzov authored and SeigeC committed Apr 4, 2023
1 parent 7087821 commit d2e38d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .golangci.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1062,10 +1062,10 @@ linters-settings:
varnamelen:
# The longest distance, in source lines, that is being considered a "small scope." (defaults to 5)
# Variables used in at most this many lines will be ignored.
max-distance: 5
max-distance: 6
# The minimum length of a variable's name that is considered "long." (defaults to 3)
# Variable names that are at least this long will be ignored.
min-name-length: 3
min-name-length: 2
# Check method receiver names. (defaults to false)
check-receiver: false
# Check named return values. (defaults to false)
Expand Down
4 changes: 4 additions & 0 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ var defaultLintersSettings = LintersSettings{
Unparam: UnparamSettings{
Algo: "cha",
},
Varnamelen: VarnamelenSettings{
MaxDistance: 5,
MinNameLength: 3,
},
WSL: WSLSettings{
StrictAppend: true,
AllowAssignAndCallCuddle: true,
Expand Down

0 comments on commit d2e38d0

Please sign in to comment.