Skip to content

Commit 8cc4d25

Browse files
committed
Remove redundant analysis kind check
1 parent 406bbfc commit 8cc4d25

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

lib/analyze-action.js

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/analyze.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -549,12 +549,9 @@ export async function runQueries(
549549
): Promise<{ summary: string; sarifFile: string }> {
550550
logger.info(`Interpreting ${analysis.name} results for ${language}`);
551551

552-
// If this is a Code Quality analysis, correct the category to one
553-
// accepted by the Code Quality backend.
554-
let category = automationDetailsId;
555-
if (analysis.kind === analyses.AnalysisKind.CodeQuality) {
556-
category = analysis.fixCategory(logger, automationDetailsId);
557-
}
552+
// Apply the analysis configuration's `fixCategory` function to adjust the category if needed.
553+
// This is a no-op for Code Scanning.
554+
const category = analysis.fixCategory(logger, automationDetailsId);
558555

559556
const sarifFile = path.join(
560557
sarifFolder,

0 commit comments

Comments
 (0)