diff --git a/.gitignore b/.gitignore index 71f016325..22dd47848 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ vendor *.swp dist/ *.log +.idea diff --git a/lint/file.go b/lint/file.go index 23255304c..e34f8b7f4 100644 --- a/lint/file.go +++ b/lint/file.go @@ -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" { diff --git a/rule/datarace.go b/rule/datarace.go index 86ec6e113..21a7a706e 100644 --- a/rule/datarace.go +++ b/rule/datarace.go @@ -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{}{} }