@@ -675,18 +675,17 @@ export async function runQueries(
675675 // the database was initialised.
676676 const queries : string [ ] = [ ] ;
677677
678- // If both Code Scanning and Code Quality analyses are enabled, the database
679- // is initialised for Code Scanning. To avoid duplicate work, we want to run
680- // queries for both analyses at the same time. To do this, we invoke `run-queries`
681- // once with the generated query suite for Code Scanning + the fixed
682- // query suite for Code Quality.
683- if (
684- configUtils . isCodeQualityEnabled ( config ) &&
685- configUtils . isCodeScanningEnabled ( config )
686- ) {
678+ // If multiple analysis kinds are enabled, the database is initialised for Code Scanning.
679+ // To avoid duplicate work, we want to run queries for all analyses at the same time.
680+ // To do this, we invoke `run-queries` once with the generated query suite that was created
681+ // when the database was initialised + the queries for other analysis kinds.
682+ if ( config . analysisKinds . length > 1 ) {
687683 queries . push ( util . getGeneratedSuitePath ( config , language ) ) ;
688- for ( const qualityQuery of analyses . codeQualityQueries ) {
689- queries . push ( resolveQuerySuiteAlias ( language , qualityQuery ) ) ;
684+
685+ if ( configUtils . isCodeQualityEnabled ( config ) ) {
686+ for ( const qualityQuery of analyses . codeQualityQueries ) {
687+ queries . push ( resolveQuerySuiteAlias ( language , qualityQuery ) ) ;
688+ }
690689 }
691690 }
692691
0 commit comments