6 "honnef.co/go/tools/lintcmd/runner"
9 func parseDirectives(dirs []runner.SerializedDirective) ([]ignore, []problem) {
11 var problems []problem
13 for _, dir := range dirs {
17 case "ignore", "file-ignore":
20 Diagnostic: runner.Diagnostic{
21 Position: dir.NodePosition,
22 Message: "malformed linter directive; missing the required reason field?",
25 Severity: severityError,
27 problems = append(problems, p)
31 // unknown directive, ignore
34 checks := strings.Split(args[0], ",")
35 pos := dir.NodePosition
43 Pos: dir.DirectivePosition,
51 ignores = append(ignores, ig)
54 return ignores, problems