Improve wording to address review feedback

This commit is contained in:
Michael B. Gale
2026-10-22 13:48:48 +01:00
parent ac509b698f
commit 87da5f37e5
3 changed files with 5 additions and 5 deletions

View File

@@ -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);

View File

@@ -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(

View File

@@ -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 {