Skip to content

Commit be36887

Browse files
committed
Generalize exit code 32 to no code found error
1 parent 7e39cda commit be36887

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

lib/cli-errors.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/cli-errors.js.map

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

src/cli-errors.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export enum CliConfigErrorCategory {
112112
}
113113

114114
type 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]: {
@@ -161,7 +165,6 @@ export const cliErrorsConfig: Record<
161165
* can be applied to the DetectedCodeButCouldNotProcess category.
162166
*/
163167
[CliConfigErrorCategory.NoJavaScriptTypeScriptCodeFound]: {
164-
exitCode: 32,
165168
cliErrorMessageSnippets: ["No JavaScript or TypeScript code found."],
166169
additionalErrorMessageToPrepend:
167170
"No code found during the build. Please see: " +

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy