mirror of
https://github.com/mgechev/revive.git
synced 2025-02-07 13:31:42 +02:00
fix lint issues (#1038)
This commit is contained in:
parent
259f22ea3f
commit
6b745b0075
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ vendor
|
||||
*.swp
|
||||
dist/
|
||||
*.log
|
||||
.idea
|
||||
|
@ -188,7 +188,7 @@ func (f *File) disabledIntervals(rules []Rule, mustSpecifyDisableReason bool, fa
|
||||
enabledDisabledRulesMap[name] = existing
|
||||
}
|
||||
|
||||
handleRules := func(filename, modifier string, isEnabled bool, line int, ruleNames []string) []DisabledInterval {
|
||||
handleRules := func(_, modifier string, isEnabled bool, line int, ruleNames []string) []DisabledInterval {
|
||||
var result []DisabledInterval
|
||||
for _, name := range ruleNames {
|
||||
if modifier == "line" {
|
||||
|
@ -80,7 +80,7 @@ func (w lintFunctionForDataRaces) Visit(node ast.Node) ast.Visitor {
|
||||
return nil
|
||||
}
|
||||
|
||||
getIds := func(exprs ...ast.Expr) []*ast.Ident {
|
||||
getIDs := func(exprs ...ast.Expr) []*ast.Ident {
|
||||
r := []*ast.Ident{}
|
||||
for _, expr := range exprs {
|
||||
if id, ok := expr.(*ast.Ident); ok {
|
||||
@ -90,7 +90,7 @@ func (w lintFunctionForDataRaces) Visit(node ast.Node) ast.Visitor {
|
||||
return r
|
||||
}
|
||||
|
||||
ids := getIds(n.Key, n.Value)
|
||||
ids := getIDs(n.Key, n.Value)
|
||||
for _, id := range ids {
|
||||
w.rangeIDs[id.Obj] = struct{}{}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user