Michael B. Gale
6222edff53
Move error messages from config-utils to their own file
2025-09-19 17:08:09 +01:00
Michael B. Gale
3305d21389
Move UserConfig to its own file
2025-09-19 17:08:00 +01:00
Henry Mercer
df1fe23118
Merge pull request #3083 from github/henrymercer/resolve-languages-default-queries
...
Resolve supported languages using CodeQL CLI
2025-09-12 10:12:15 +01:00
Chuan-kai Lin
5c30ae46c1
Stop saving config in initConfig()
2025-09-11 12:31:29 -07:00
Chuan-kai Lin
4e2e64a92a
init-action: save updated config
...
This commit updates the init action to save the config again at the end
of run(), so that config updates in run() are correctly propagated to
the analyze action.
2025-09-11 08:07:50 -07:00
Michael B. Gale
4f56152a48
Store and check action version in Config
2025-09-10 13:33:17 +01:00
Michael B. Gale
0a56aada02
Merge pull request #3064 from github/mbg/cq/allow-cq-only-analysis
...
Allow Code Quality only analysis
2025-09-08 16:13:19 +01:00
Michael B. Gale
e045f5eeb4
Fix hasActionsWorkflows throwing if workflows folder doesn't exist
2025-09-05 21:11:33 +01:00
Henry Mercer
d981505040
Add log for supported languages
2025-09-05 16:56:15 +01:00
Henry Mercer
f8fb310547
Resolve supported languages using CodeQL CLI
2025-09-05 16:17:32 +01:00
Michael B. Gale
918e792ec9
Throw an error if query customisations are enabled for a code-quality-only analysis
2025-09-05 12:44:30 +01:00
Michael B. Gale
5d822f13cd
Rename getDbAnalysisKind and getDbAnalysisConfig
2025-09-05 12:39:34 +01:00
Michael B. Gale
f4fca70590
Do not mutate originalUserInput
2025-09-04 11:56:48 +01:00
Michael B. Gale
3ee9287c7a
Update condition and comment for CQ-only config
2025-09-04 11:44:34 +01:00
Michael B. Gale
01fe6a1120
Override query configuration for Code Quality only analyses
2025-09-04 11:43:51 +01:00
Michael B. Gale
8ea50b8f82
Add and use helpers for determining analysis config the DB is initialised with
2025-09-04 11:39:22 +01:00
Michael B. Gale
85a4853504
Add utility function to check if code scanning is enabled
2025-09-04 11:38:07 +01:00
Michael B. Gale
f2e20f52e0
Rename getDefaultConfig and update doc comment
2025-09-04 10:01:17 +01:00
Michael B. Gale
8d623f4184
Populate computedConfig in getDefaultConfig
2025-09-04 09:57:29 +01:00
Michael B. Gale
0fb047d929
Set user-provided UserConfig in getDefaultConfig
2025-09-04 09:55:00 +01:00
Michael B. Gale
87c5b58925
Remove augmentationProperties from Config
2025-09-03 12:56:58 +01:00
Michael B. Gale
7f81363b78
Mark result of appendExtraQueryExclusions as Readonly to prevent further modification
2025-09-03 12:21:31 +01:00
Michael B. Gale
e9fb72dd82
Move extraQueryExclusions out of AugmentationProperties
2025-09-03 12:13:58 +01:00
Michael B. Gale
ac9b91e745
Move overlay db settings from AugmentationProperties to Config
2025-09-02 18:02:12 +01:00
Michael B. Gale
c4d2772a75
Add computedConfig property to Config type
2025-09-02 18:01:49 +01:00
Michael B. Gale
e116d9977e
Stop propagating quality-queries input
2025-09-02 17:31:57 +01:00
Michael B. Gale
f96201c4af
Use analysisKinds to decide if Code Quality is enabled
2025-08-27 18:23:02 +01:00
Michael B. Gale
06c39b6b6f
Add Code Quality to enabled analysis kinds if there is an input to quality-queries
...
For backwards compatibility. We should remove this once `quality-queries` is no longer in use.
2025-08-27 18:23:02 +01:00
Michael B. Gale
e0104a269f
Add analysis-kinds input and parse it
2025-08-27 18:23:01 +01:00
Michael B. Gale
d6621b9f4e
Refactor check whether CQ is enabled
...
This will make it easier to replace in the future
2025-08-21 15:20:19 +01:00
Henry Mercer
5794ffcb4a
Fix auto-detection of extractors that aren't languages
2025-08-07 21:09:22 +01:00
Michael B. Gale
f28436bcbf
Update log message in getRawLanguagesInRepo
2025-08-07 12:43:21 +01:00
Michael B. Gale
0d72a5b371
Check that stats isn't undefined before trying to call isDirectory
2025-08-07 11:25:01 +01:00
Michael B. Gale
43638b10a0
Support auto-detecting Actions workflows
2025-08-07 11:04:21 +01:00
Henry Mercer
377976a96e
Improve type of trapCaches now Language is non-exhaustive
2025-08-05 18:09:37 +01:00
Henry Mercer
ea05bf27b6
Use more explicit checks on .length for readability
2025-08-05 17:55:50 +01:00
Henry Mercer
83e92edc4b
Improve detection of Rust in languages input
2025-08-05 11:43:04 +01:00
Henry Mercer
c481481d7d
Merge branch 'main' into henrymercer/language-extensibility
2025-08-05 11:07:39 +01:00
Chuan-kai Lin
90d7727554
Overlay: check code-scanning features
2025-07-10 14:16:19 -07:00
Chuan-kai Lin
fb771764cb
Extract generateCodeScanningConfig()
2025-07-10 14:14:46 -07:00
Chuan-kai Lin
d799ff5e6a
Overlay: check per-language features
2025-07-10 14:14:14 -07:00
Chuan-kai Lin
55cb6b8b94
Extract isOverlayAnalysisFeatureEnabled()
2025-07-10 10:48:43 -07:00
Chuan-kai Lin
64fce5856f
Use exclude-from-incremental also for overlay analysis
2025-07-09 14:32:05 -07:00
Chuan-kai Lin
fe7205c739
Move getOverlayDatabaseMode() call into initConfig()
...
In an upcoming change, getOverlayDatabaseMode() will depend on the
contents of Config. As a result, getOverlayDatabaseMode() needs to be
called after the rest of Config has already been populated.
This commit performs the refactoring to move the
getOverlayDatabaseMode() into initConfig(), after the rest of Config has
already been populated.
2025-07-09 14:32:05 -07:00
Chuan-kai Lin
4cd7a721f7
Remove loadConfig()
...
The loadConfig() function is mostly the same as getDefaultConfig(),
except that it calls loadUserConfig() and stores the results in
originalUserInput.
This refactoring commit replaces the loadConfig() call with
getDefaultConfig() and loadUserConfig(), which allows deleting a large
amount of duplicated code.
2025-07-09 14:32:05 -07:00
Chuan-kai Lin
f4358b38d1
Extract loadUserConfig()
2025-07-09 14:32:05 -07:00
Chuan-kai Lin
95a1b7e2bf
Add getOverlayDatabaseMode() tests
2025-07-07 08:14:41 -07:00
Chuan-kai Lin
d42ce71087
Add AugmentationProperties.useOverlayDatabaseCaching
...
This commit adds useOverlayDatabaseCaching to AugmentationProperties to
indicate whether the action should upload overlay-base databases to the
actions cache and to download a cached overlay-base database when
creating an overlay database.
2025-07-03 12:35:24 -07:00
Chuan-kai Lin
b4425372ef
Limit OverlayAnalysis to internal repos
2025-07-03 12:35:24 -07:00
Chuan-kai Lin
93e8729640
getOverlayDatabaseMode: use Feature.OverlayAnalysis
...
This commit changes getOverlayDatabaseMode so that, when
Feature.OverlayAnalysis is enabled, it calculates the overlay database
mode automatically based on analysis metadata. If we are analyzing the
default branch, use OverlayBase, and if we are analyzing a PR, use
Overlay.
If CODEQL_OVERLAY_DATABASE_MODE is set to a valid overlay database mode,
that environment variable still takes precedence.
2025-07-03 12:35:24 -07:00