Skip to content

Commit

Permalink
upgarde asasalint v0.0.6, and add some note in reference.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alingse committed Jul 15, 2022
1 parent 83cb185 commit 6341671
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
12 changes: 8 additions & 4 deletions .golangci.reference.yml
Expand Up @@ -108,17 +108,21 @@ output:
# All available settings of specific linters.
linters-settings:
asasalint:
# Add FuncName to exclude for some bad case report.
# Add FuncName to exclude for avoid some bad case report.
# the asasalint has also some builtin exclude func names, not need to config here,
# and can disabled by `no-builtin-exclude` option.
# they are `Printf,Println,Fprintf,Fprintln,Fatal,Fatalf,Panic,Panicf,Panicln,Print,Printf,Println,Sprintf,Sprintln,Error,Errorf,Info,Infof,Warn,Warnf,Debug,Debugf`.
# Default: []
exclude:
- Append
- Log
# ignore found case in *_test.go file
# Default: false
ignore-in-test: false
# if true, will disable the default exclude see https://github.com/alingse/asasalint/blob/main/asasalint.go#L15 like: Printf,Println,Errorf,Debugf ...
ignore-in-test: true
# if true, will disable the builtin exclude see https://github.com/alingse/asasalint/blob/main/asasalint.go#L15 like: Printf,Println,Errorf,Debugf ...
# Default: false
no-default-exclude: false
no-builtin-exclude: true

bidichk:
# The following configurations check for all mentioned invisible unicode runes.
# All runes are enabled by default.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -11,7 +11,7 @@ require (
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.2.0
github.com/OpenPeeDeeP/depguard v1.1.0
github.com/alexkohler/prealloc v1.0.0
github.com/alingse/asasalint v0.0.5
github.com/alingse/asasalint v0.0.6
github.com/ashanbrown/forbidigo v1.3.0
github.com/ashanbrown/makezero v1.1.1
github.com/bkielbasa/cyclop v1.2.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/config/linters_settings.go
Expand Up @@ -188,7 +188,7 @@ type LintersSettings struct {
type AsasalintSettings struct {
Exclude []string `mapstructure:"exclude"`
IgnoreInTest bool `mapstructure:"ignore-in-test"`
NoDefaultExclude bool `mapstructure:"no-default-exclude"`
NoBuiltinExclude bool `mapstructure:"no-builtin-exclude"`
}

type BiDiChkSettings struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/golinters/asasalint.go
Expand Up @@ -13,7 +13,7 @@ func NewAsasalint(setting *config.AsasalintSettings) *goanalysis.Linter {
if setting != nil {
cfg.Exclude = setting.Exclude
cfg.IgnoreInTest = setting.IgnoreInTest
cfg.NoDefaultExclude = setting.NoDefaultExclude
cfg.NoBuiltinExclude = setting.NoBuiltinExclude
}

a := asasalint.NewAnalyzer(cfg)
Expand Down

0 comments on commit 6341671

Please sign in to comment.