diff --git a/.golangci.example.yml b/.golangci.example.yml index df2af8e2525e..cb8045d635f2 100644 --- a/.golangci.example.yml +++ b/.golangci.example.yml @@ -1057,10 +1057,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) diff --git a/pkg/config/linters_settings.go b/pkg/config/linters_settings.go index e7f07db50aa4..338e6b14d3fa 100644 --- a/pkg/config/linters_settings.go +++ b/pkg/config/linters_settings.go @@ -81,6 +81,10 @@ var defaultLintersSettings = LintersSettings{ Unparam: UnparamSettings{ Algo: "cha", }, + Varnamelen: VarnamelenSettings{ + MaxDistance: 5, + MinNameLength: 3, + }, WSL: WSLSettings{ StrictAppend: true, AllowAssignAndCallCuddle: true,