@@ -112,6 +112,7 @@ export enum CliConfigErrorCategory {
112112}
113113
114114type CliErrorConfiguration = {
115+ // All of these snippets should be present to match to a specific CliConfigErrorCategory.
115116 cliErrorMessageSnippets : string [ ] ;
116117 exitCode ?: number ;
117118 // Error message to prepend for this type of CLI error.
@@ -130,11 +131,14 @@ export const cliErrorsConfig: Record<
130131 // Usually when a manual build script has failed, or if an autodetected language
131132 // was unintended to have CodeQL analysis run on it.
132133 [ CliConfigErrorCategory . DetectedCodeButCouldNotProcess ] : {
134+ exitCode : 32 ,
133135 cliErrorMessageSnippets : [
134136 "CodeQL detected code written in" ,
135137 "but could not process any of it" ,
136138 ] ,
137- additionalErrorMessageToPrepend : `Check the build script, if applicable, for the language specified in the error:` ,
139+ additionalErrorMessageToPrepend :
140+ "No code found during the build. Please see: " +
141+ "https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build." ,
138142 } ,
139143 // Version of CodeQL CLI is incompatible with this version of the CodeQL Action
140144 [ CliConfigErrorCategory . IncompatibleWithActionVersion ] : {
@@ -157,11 +161,9 @@ export const cliErrorsConfig: Record<
157161 * `codeql database finalize`. To ensure users get a good error message, we detect this manually
158162 * here, and upon detection override the error message.
159163 *
160- * This can be removed once support for CodeQL 2.11.6 is removed, and once removed, exit code 32
161- * can be applied to the DetectedCodeButCouldNotProcess category.
164+ * This can be removed once support for CodeQL 2.11.6 is removed.
162165 */
163166 [ CliConfigErrorCategory . NoJavaScriptTypeScriptCodeFound ] : {
164- exitCode : 32 ,
165167 cliErrorMessageSnippets : [ "No JavaScript or TypeScript code found." ] ,
166168 additionalErrorMessageToPrepend :
167169 "No code found during the build. Please see: " +
0 commit comments