Skip to content

Commit

Permalink
ruleguard: remove unused severity field (#150)
Browse files Browse the repository at this point in the history
We don't have any severity levels yet and there is 0
user requests for them.
  • Loading branch information
quasilyte authored Dec 22, 2020
1 parent a804b15 commit 5d7e62a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion ruleguard/gorule.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ type goRule struct {
group string
filename string
line int
severity string
pat *gogrep.Pattern
msg string
location string
Expand Down
6 changes: 1 addition & 5 deletions ruleguard/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,7 @@ func (rr *rulesRunner) handleMatch(rule goRule, m gogrep.MatchData) bool {
}
}

prefix := ""
if rule.severity != "" {
prefix = rule.severity + ": "
}
message := prefix + rr.renderMessage(rule.msg, m.Node, m.Values, true)
message := rr.renderMessage(rule.msg, m.Node, m.Values, true)
node := m.Node
if rule.location != "" {
node = m.Values[rule.location]
Expand Down

0 comments on commit 5d7e62a

Please sign in to comment.