mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
feat: add the gosmopolitan linter (#3458)
This commit is contained in:
parent
b29a4f6dc0
commit
553d7df585
16 changed files with 223 additions and 0 deletions
|
@ -61,6 +61,12 @@ var defaultLintersSettings = LintersSettings{
|
|||
Gosec: GoSecSettings{
|
||||
Concurrency: runtime.NumCPU(),
|
||||
},
|
||||
Gosmopolitan: GosmopolitanSettings{
|
||||
AllowTimeLocal: false,
|
||||
EscapeHatches: []string{},
|
||||
IgnoreTests: true,
|
||||
WatchForScripts: []string{"Han"},
|
||||
},
|
||||
Ifshort: IfshortSettings{
|
||||
MaxDeclLines: 1,
|
||||
MaxDeclChars: 30,
|
||||
|
@ -167,6 +173,7 @@ type LintersSettings struct {
|
|||
Gomodguard GoModGuardSettings
|
||||
Gosec GoSecSettings
|
||||
Gosimple StaticCheckSettings
|
||||
Gosmopolitan GosmopolitanSettings
|
||||
Govet GovetSettings
|
||||
Grouper GrouperSettings
|
||||
Ifshort IfshortSettings
|
||||
|
@ -449,6 +456,13 @@ type GoSecSettings struct {
|
|||
Concurrency int `mapstructure:"concurrency"`
|
||||
}
|
||||
|
||||
type GosmopolitanSettings struct {
|
||||
AllowTimeLocal bool `mapstructure:"allow-time-local"`
|
||||
EscapeHatches []string `mapstructure:"escape-hatches"`
|
||||
IgnoreTests bool `mapstructure:"ignore-tests"`
|
||||
WatchForScripts []string `mapstructure:"watch-for-scripts"`
|
||||
}
|
||||
|
||||
type GovetSettings struct {
|
||||
Go string `mapstructure:"-"`
|
||||
CheckShadowing bool `mapstructure:"check-shadowing"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue