Skip to content

Commit

Permalink
[Fix] the issue where problems detected by custom rules are not displ…
Browse files Browse the repository at this point in the history
…ayed in the report.

Corrected CxxSquidSensor's saveViolations function to allow creation of new issues with a source other than "cxx", enabling reporting of detection results based on CustomCxxRulesDefinition, ensuring proper display of custom sources on the web server.

Signed-off-by: qinyong <qiny15@chinatelecom.cn>
  • Loading branch information
qinyong committed Feb 28, 2024
1 parent e2c2814 commit e2c3004
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ private void saveViolations(InputFile inputFile, SourceFile sourceFile) {

RuleKey ruleKey = checks.ruleKey((SquidAstVisitor<Grammar>) message.getCheck());
if (ruleKey != null) {
var newIssue = context.newIssue().forRule(RuleKey.of(CheckList.REPOSITORY_KEY, ruleKey.rule()));
var newIssue = context.newIssue().forRule(RuleKey.of(ruleKey.repository(), ruleKey.rule()));
var location = newIssue.newLocation()
.on(inputFile)
.at(inputFile.selectLine(line))
Expand Down

0 comments on commit e2c3004

Please sign in to comment.