mirror of
https://github.com/github/codeql-action.git
synced 2026-11-05 04:29:40 +00:00
Improve wording to address review feedback
This commit is contained in:
@@ -909,8 +909,8 @@ export async function getCodeQLForCmd(
|
||||
// We may be exporting diagnostics for a failed SARIF, in which case the configuration
|
||||
// file may not have been written to disk and there may not be a database. The CLI
|
||||
// will produce a SARIF for diagnostics from `diagnosticDir` without it. Therefore,
|
||||
// if `diagnosticDir` is set, we check whether `configPath` exists and only provide
|
||||
// it to the CLI if it does. Although not needed, the CLI will produce an error if it
|
||||
// we check whether `configPath` exists and only provide it to the CLI if it does.
|
||||
// Although not needed, the CLI will produce an error if it
|
||||
// is provided with an argument to `--sarif-codescanning-config` that does not exist.
|
||||
let configPath: string | undefined =
|
||||
getGeneratedCodeScanningConfigPath(config);
|
||||
|
||||
@@ -66,7 +66,7 @@ test("getTempLanguageDiagnosticsPath returns language-specific path if a languag
|
||||
);
|
||||
}));
|
||||
|
||||
test("getDatabaseDiagnosticsPath returns language-specific path if a language is provided", async (t) =>
|
||||
test("getDatabaseDiagnosticsPath returns language-specific path", async (t) =>
|
||||
withTmpDir(async (tmpDir) => {
|
||||
t.is(
|
||||
diagnostics.getDatabaseDiagnosticsPath(
|
||||
|
||||
@@ -137,7 +137,7 @@ export function makeDiagnostic(
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a path relative to {@link basePath} where diagnostics for to {@link language} should be stored at.
|
||||
* Gets a path relative to {@link basePath} where diagnostics for {@link language} should be stored at.
|
||||
*/
|
||||
export function getLanguageDiagnosticsPath(
|
||||
basePath: string,
|
||||
@@ -200,7 +200,7 @@ export function addDiagnostic(
|
||||
: config.dbLocation;
|
||||
|
||||
// Check that the database exists before writing to it. If the database does not yet exist,
|
||||
// store the diagnostic in memory and write it later.
|
||||
// store the diagnostic in a temporary location and move it to the database later.
|
||||
if (fs.existsSync(databasePath)) {
|
||||
writeDiagnostic({ logger }, config, language, diagnostic);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user