Skip to content

Commit

Permalink
lint: remove Problem.Checker field
Browse files Browse the repository at this point in the history
Nothing used it anymore.
  • Loading branch information
dominikh committed Apr 15, 2019
1 parent 5d01066 commit b088cad
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions lint/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ type Job struct {
Pkg *Pkg
GoVersion int

checker string
check Check
problems []Problem

Expand Down Expand Up @@ -135,7 +134,6 @@ type Problem struct {
Position token.Position // position in source file
Text string // the prose that describes the problem
Check string
Checker string
Package *Pkg
Severity Severity
}
Expand Down Expand Up @@ -350,7 +348,6 @@ func (l *Linter) Lint(initial []*packages.Package, stats *PerfStats) []Problem {
Position: DisplayPosition(prog.Fset(), c.Pos()),
Text: "malformed linter directive; missing the required reason field?",
Check: "",
Checker: "lint",
Package: nil,
}
out = append(out, p)
Expand Down Expand Up @@ -409,7 +406,6 @@ func (l *Linter) Lint(initial []*packages.Package, stats *PerfStats) []Problem {
for _, pkg := range pkgs {
j := &Job{
Pkg: pkg,
checker: checker.Name(),
check: check,
GoVersion: l.GoVersion,
}
Expand Down Expand Up @@ -489,7 +485,6 @@ func (l *Linter) Lint(initial []*packages.Package, stats *PerfStats) []Problem {
Position: DisplayPosition(prog.Fset(), ig.pos),
Text: "this linter directive didn't match anything; should it be removed?",
Check: "",
Checker: "lint",
Package: nil,
}
out = append(out, p)
Expand Down Expand Up @@ -616,7 +611,6 @@ func (j *Job) Errorf(n Positioner, format string, args ...interface{}) *Problem
Position: pos,
Text: fmt.Sprintf(format, args...),
Check: j.check.ID,
Checker: j.checker,
Package: j.Pkg,
}
j.problems = append(j.problems, problem)
Expand Down
1 change: 0 additions & 1 deletion lint/lintutil/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ func compileErrors(pkg *packages.Package) []lint.Problem {
p := lint.Problem{
Position: parsePos(err.Pos),
Text: err.Msg,
Checker: "compiler",
Check: "compile",
}
ps = append(ps, p)
Expand Down

0 comments on commit b088cad

Please sign in to comment.