feat(parser/cppcheck): match both id and severity
This commit is contained in:
parent
f2000a2a11
commit
bcaed579e5
|
@ -87,7 +87,8 @@ func GetResult(records []Record, conf Conf) (string, int, error) {
|
||||||
for _, record := range records {
|
for _, record := range records {
|
||||||
for _, match := range conf.Matches {
|
for _, match := range conf.Matches {
|
||||||
for _, keyword := range match.Keywords {
|
for _, keyword := range match.Keywords {
|
||||||
if strings.Contains(record.Id, keyword) {
|
if strings.Contains(record.Id, keyword) ||
|
||||||
|
strings.Contains(record.Severity, keyword) {
|
||||||
matchCount[keyword] += 1
|
matchCount[keyword] += 1
|
||||||
scoreChange[keyword] += -match.Score
|
scoreChange[keyword] += -match.Score
|
||||||
score += -match.Score
|
score += -match.Score
|
||||||
|
|
Loading…
Reference in New Issue
Block a user