generated from TrueCloudLab/basic
noliteral: add noliteral configuration #6
No reviewers
Labels
No labels
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/linters#6
Loading…
Reference in a new issue
No description provided.
Delete branch "achuprov/linters:noliteral-configuration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Added noliteral configuration for golangci >= 1.5.4.
9cddefcc6b
to1cbb08eea4
@ -16,3 +16,3 @@
}
var methodsToSearch = []string{"Debug", "Info", "Warn", "Error", "reportFlushError", "reportError"}
type Сonfiguration struct {
Looks like you use here and below Cyrillic C instead of Latin.
fixed
@ -17,2 +17,3 @@
var methodsToSearch = []string{"Debug", "Info", "Warn", "Error", "reportFlushError", "reportError"}
type Сonfiguration struct {
MethodsToSearch []string `mapstructure:"target-methods"`
Is this tag required?
I change the variable name, but I left tag.
@ -15,0 +17,4 @@
// for version ci-lint >= '1.5.4'.
func New(conf any) ([]*analysis.Analyzer, error) {
var config noliteral.Сonfiguration
here too
1cbb08eea4
toe59c69bf24
@ -33,3 +33,3 @@
_, err = run(pass)
if Count != 6 {
if Count != 4 {
From 1 magic number to another, can we replace with a constant/some function? Is this
len(Config.TargetMethods
?@ -15,0 +19,4 @@
func New(conf any) ([]*analysis.Analyzer, error) {
var config noliteral.Configuration
if confMap, ok := conf.(map[string]interface{}); ok {
any
in the arguments, butinterface{}
here, what aboutany
everywhere?fixed
e59c69bf24
toa1a45f5368