File tree Expand file tree Collapse file tree 6 files changed +15
-12
lines changed Expand file tree Collapse file tree 6 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -875,6 +875,7 @@ linters-settings:
875875 - G404 # Insecure random number source (rand)
876876 - G405 # Detect the usage of DES or RC4
877877 - G406 # Detect the usage of MD4 or RIPEMD160
878+ - G407 # Detect the usage of hardcoded Initialization Vector(IV)/Nonce
878879 - G501 # Import blocklist: crypto/md5
879880 - G502 # Import blocklist: crypto/des
880881 - G503 # Import blocklist: crypto/rc4
@@ -920,6 +921,7 @@ linters-settings:
920921 - G404 # Insecure random number source (rand)
921922 - G405 # Detect the usage of DES or RC4
922923 - G406 # Detect the usage of MD4 or RIPEMD160
924+ - G407 # Detect the usage of hardcoded Initialization Vector(IV)/Nonce
923925 - G501 # Import blocklist: crypto/md5
924926 - G502 # Import blocklist: crypto/des
925927 - G503 # Import blocklist: crypto/rc4
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ require (
9292 github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
9393 github.com/sashamelentyev/interfacebloat v1.1.0
9494 github.com/sashamelentyev/usestdlibvars v1.27.0
95- github.com/securego/gosec/v2 v2.20.1-0.20240826145712-bcec04e78483
95+ github.com/securego/gosec/v2 v2.21.0
9696 github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c
9797 github.com/shirou/gopsutil/v3 v3.24.5
9898 github.com/sirupsen/logrus v1.9.3
Original file line number Diff line number Diff line change 155155 " G404" ,
156156 " G405" ,
157157 " G406" ,
158+ " G407" ,
158159 " G501" ,
159160 " G502" ,
160161 " G503" ,
Original file line number Diff line number Diff line change @@ -717,7 +717,7 @@ type MustTagSettings struct {
717717}
718718
719719type NakedretSettings struct {
720- MaxFuncLines int `mapstructure:"max-func-lines"`
720+ MaxFuncLines uint `mapstructure:"max-func-lines"`
721721}
722722
723723type NestifSettings struct {
Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ import (
99)
1010
1111func New (settings * config.NakedretSettings ) * goanalysis.Linter {
12- var maxLines int
12+ var maxLines uint
1313 if settings != nil {
1414 maxLines = settings .MaxFuncLines
1515 }
1616
17- a := nakedret .NakedReturnAnalyzer (uint ( maxLines ) )
17+ a := nakedret .NakedReturnAnalyzer (maxLines )
1818
1919 return goanalysis .NewLinter (
2020 a .Name ,
You can’t perform that action at this time.
0 commit comments