Skip to content

Commit 85a4853

Browse files
committed
Add utility function to check if code scanning is enabled
1 parent 434df8e commit 85a4853

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/config-utils.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,6 +1509,13 @@ export function appendExtraQueryExclusions(
15091509
return augmentedConfig;
15101510
}
15111511

1512+
/**
1513+
* Returns `true` if Code Scanning analysis is enabled, or `false` if not.
1514+
*/
1515+
export function isCodeScanningEnabled(config: Config): boolean {
1516+
return config.analysisKinds.includes(AnalysisKind.CodeScanning);
1517+
}
1518+
15121519
/**
15131520
* Returns `true` if Code Quality analysis is enabled, or `false` if not.
15141521
*/

0 commit comments

Comments
 (0)