Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
upgarde asasalint v0.0.6, and add some note in reference.yml
  • Loading branch information
alingse committed Jul 15, 2022
commit 6341671ad05b9c56fffebd745a234ccd53e6e7cd
12 changes: 8 additions & 4 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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