Skip to content

Commit

Permalink
fix lint issues (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
ytnsym authored Sep 16, 2024
1 parent 259f22e commit 6b745b0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ vendor
*.swp
dist/
*.log
.idea
2 changes: 1 addition & 1 deletion lint/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
4 changes: 2 additions & 2 deletions rule/datarace.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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{}{}
}
Expand Down

0 comments on commit 6b745b0

Please sign in to comment.