Fix spelling errors

spelling: executable
spelling: github
spelling: javascript
spelling: latest
spelling: occurred
spelling: parameter

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref 2021-02-28 01:55:55 -05:00 committed by Andrew Eisenberg
parent 08fae3caba
commit c4fced7348
20 changed files with 65 additions and 65 deletions

4
lib/actions-util.js generated
View file

@ -328,7 +328,7 @@ function getWorkflowRunID() {
}
exports.getWorkflowRunID = getWorkflowRunID;
/**
* Get the analysis key paramter for the current job.
* Get the analysis key parameter for the current job.
*
* This will combine the workflow path and current job name.
* Computing this the first time requires making requests to
@ -490,7 +490,7 @@ async function sendStatusReport(statusReport) {
}
// something else has gone wrong and the request/response will be logged by octokit
// it's possible this is a transient error and we should continue scanning
core.error("An unexpected error occured when sending code scanning status report.");
core.error("An unexpected error occurred when sending code scanning status report.");
return true;
}
}

File diff suppressed because one or more lines are too long

2
lib/analysis-paths.js generated
View file

@ -28,7 +28,7 @@ function printPathFiltersWarning(config, logger) {
// If any other languages are detected/configured then show a warning.
if ((config.paths.length !== 0 || config.pathsIgnore.length !== 0) &&
!config.languages.every(isInterpretedLanguage)) {
logger.warning('The "paths"/"paths-ignore" fields of the config only have effect for Javascript and Python');
logger.warning('The "paths"/"paths-ignore" fields of the config only have effect for JavaScript and Python');
}
}
exports.printPathFiltersWarning = printPathFiltersWarning;

2
lib/codeql.test.js generated
View file

@ -93,7 +93,7 @@ ava_1.default("download codeql bundle cache with different version cached (not p
t.is(cachedVersions.length, 2);
});
});
ava_1.default('download codeql bundle cache with pinned different version cached if "latests" tools specified', async (t) => {
ava_1.default('download codeql bundle cache with pinned different version cached if "latest" tools specified', async (t) => {
await util.withTmpDir(async (tmpDir) => {
util.setupActionsVars(tmpDir, tmpDir);
nock_1.default("https://example.com")

File diff suppressed because one or more lines are too long

2
lib/init.js generated
View file

@ -129,7 +129,7 @@ exports.injectWindowsTracer = injectWindowsTracer;
async function installPythonDeps(codeql, logger) {
logger.startGroup("Setup Python dependencies");
const scriptsFolder = path.resolve(__dirname, "../python-setup");
// Setup tools on the Github hosted runners
// Setup tools on the GitHub hosted runners
if (process.env["ImageOS"] !== undefined) {
try {
if (process.platform === "win32") {

6
lib/runner.js generated
View file

@ -109,7 +109,7 @@ program
const apiDetails = {
auth,
externalRepoAuth: auth,
url: util_1.parseGithubUrl(cmd.githubUrl),
url: util_1.parseGitHubUrl(cmd.githubUrl),
};
const gitHubVersion = await util_1.getGitHubVersion(apiDetails);
util_1.checkGitHubVersionInRange(gitHubVersion, "runner", logger);
@ -233,7 +233,7 @@ program
const auth = await util_1.getGitHubAuth(logger, cmd.githubAuth, cmd.githubAuthStdin);
const apiDetails = {
auth,
url: util_1.parseGithubUrl(cmd.githubUrl),
url: util_1.parseGitHubUrl(cmd.githubUrl),
};
const outputDir = cmd.outputDir || path.join(config.tempDir, "codeql-sarif");
await analyze_1.runAnalyze(outputDir, util_1.getMemoryFlag(cmd.ram), util_1.getAddSnippetsFlag(cmd.addSnippets), util_1.getThreadsFlag(cmd.threads, logger), config, logger);
@ -266,7 +266,7 @@ program
const auth = await util_1.getGitHubAuth(logger, cmd.githubAuth, cmd.githubAuthStdin);
const apiDetails = {
auth,
url: util_1.parseGithubUrl(cmd.githubUrl),
url: util_1.parseGitHubUrl(cmd.githubUrl),
};
try {
const gitHubVersion = await util_1.getGitHubVersion(apiDetails);

4
lib/tracer-config.js generated
View file

@ -141,9 +141,9 @@ async function getCombinedTracerConfig(config, codeql) {
else if (process.platform !== "win32") {
mainTracerConfig.env["LD_PRELOAD"] = path.join(codeQLDir, "tools", "linux64", "${LIB}trace.so");
}
// On macos it's necessary to prefix the build command with the runner exectuable
// On macos it's necessary to prefix the build command with the runner executable
// on order to trace when System Integrity Protection is enabled.
// The exectuable also exists and works for other platforms so we output this env
// The executable also exists and works for other platforms so we output this env
// var with a path to the runner regardless so it's always available.
const runnerExeName = process.platform === "win32" ? "runner.exe" : "runner";
mainTracerConfig.env["CODEQL_RUNNER"] = path.join(mainTracerConfig.env["CODEQL_DIST"], "tools", mainTracerConfig.env["CODEQL_PLATFORM"], runnerExeName);

6
lib/util.js generated
View file

@ -171,7 +171,7 @@ exports.getCodeQLDatabasePath = getCodeQLDatabasePath;
* Parses user input of a github.com or GHES URL to a canonical form.
* Removes any API prefix or suffix if one is present.
*/
function parseGithubUrl(inputUrl) {
function parseGitHubUrl(inputUrl) {
const originalUrl = inputUrl;
if (inputUrl.indexOf("://") === -1) {
inputUrl = `https://${inputUrl}`;
@ -205,7 +205,7 @@ function parseGithubUrl(inputUrl) {
}
return url.toString();
}
exports.parseGithubUrl = parseGithubUrl;
exports.parseGitHubUrl = parseGitHubUrl;
const GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
const CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR = "CODEQL_ACTION_WARNED_ABOUT_VERSION";
let hasBeenWarnedAboutVersion = false;
@ -217,7 +217,7 @@ var GitHubVariant;
})(GitHubVariant = exports.GitHubVariant || (exports.GitHubVariant = {}));
async function getGitHubVersion(apiDetails) {
// We can avoid making an API request in the standard dotcom case
if (parseGithubUrl(apiDetails.url) === exports.GITHUB_DOTCOM_URL) {
if (parseGitHubUrl(apiDetails.url) === exports.GITHUB_DOTCOM_URL) {
return { type: GitHubVariant.DOTCOM };
}
// Doesn't strictly have to be the meta endpoint as we're only

34
lib/util.test.js generated
View file

@ -102,27 +102,27 @@ ava_1.default("getExtraOptionsEnvParam() fails on invalid JSON", (t) => {
t.throws(util.getExtraOptionsEnvParam);
process.env.CODEQL_ACTION_EXTRA_OPTIONS = origExtraOptions;
});
ava_1.default("parseGithubUrl", (t) => {
t.deepEqual(util.parseGithubUrl("github.com"), "https://github.com");
t.deepEqual(util.parseGithubUrl("https://github.com"), "https://github.com");
t.deepEqual(util.parseGithubUrl("https://api.github.com"), "https://github.com");
t.deepEqual(util.parseGithubUrl("https://github.com/foo/bar"), "https://github.com");
t.deepEqual(util.parseGithubUrl("github.example.com"), "https://github.example.com/");
t.deepEqual(util.parseGithubUrl("https://github.example.com"), "https://github.example.com/");
t.deepEqual(util.parseGithubUrl("https://api.github.example.com"), "https://github.example.com/");
t.deepEqual(util.parseGithubUrl("https://github.example.com/api/v3"), "https://github.example.com/");
t.deepEqual(util.parseGithubUrl("https://github.example.com:1234"), "https://github.example.com:1234/");
t.deepEqual(util.parseGithubUrl("https://api.github.example.com:1234"), "https://github.example.com:1234/");
t.deepEqual(util.parseGithubUrl("https://github.example.com:1234/api/v3"), "https://github.example.com:1234/");
t.deepEqual(util.parseGithubUrl("https://github.example.com/base/path"), "https://github.example.com/base/path/");
t.deepEqual(util.parseGithubUrl("https://github.example.com/base/path/api/v3"), "https://github.example.com/base/path/");
t.throws(() => util.parseGithubUrl(""), {
ava_1.default("parseGitHubUrl", (t) => {
t.deepEqual(util.parseGitHubUrl("github.com"), "https://github.com");
t.deepEqual(util.parseGitHubUrl("https://github.com"), "https://github.com");
t.deepEqual(util.parseGitHubUrl("https://api.github.com"), "https://github.com");
t.deepEqual(util.parseGitHubUrl("https://github.com/foo/bar"), "https://github.com");
t.deepEqual(util.parseGitHubUrl("github.example.com"), "https://github.example.com/");
t.deepEqual(util.parseGitHubUrl("https://github.example.com"), "https://github.example.com/");
t.deepEqual(util.parseGitHubUrl("https://api.github.example.com"), "https://github.example.com/");
t.deepEqual(util.parseGitHubUrl("https://github.example.com/api/v3"), "https://github.example.com/");
t.deepEqual(util.parseGitHubUrl("https://github.example.com:1234"), "https://github.example.com:1234/");
t.deepEqual(util.parseGitHubUrl("https://api.github.example.com:1234"), "https://github.example.com:1234/");
t.deepEqual(util.parseGitHubUrl("https://github.example.com:1234/api/v3"), "https://github.example.com:1234/");
t.deepEqual(util.parseGitHubUrl("https://github.example.com/base/path"), "https://github.example.com/base/path/");
t.deepEqual(util.parseGitHubUrl("https://github.example.com/base/path/api/v3"), "https://github.example.com/base/path/");
t.throws(() => util.parseGitHubUrl(""), {
message: '"" is not a valid URL',
});
t.throws(() => util.parseGithubUrl("ssh://github.com"), {
t.throws(() => util.parseGitHubUrl("ssh://github.com"), {
message: '"ssh://github.com" is not a http or https URL',
});
t.throws(() => util.parseGithubUrl("http:///::::433"), {
t.throws(() => util.parseGitHubUrl("http:///::::433"), {
message: '"http:///::::433" is not a valid URL',
});
});

View file

@ -396,7 +396,7 @@ export function getWorkflowRunID(): number {
}
/**
* Get the analysis key paramter for the current job.
* Get the analysis key parameter for the current job.
*
* This will combine the workflow path and current job name.
* Computing this the first time requires making requests to
@ -633,7 +633,7 @@ export async function sendStatusReport<S extends StatusReportBase>(
// something else has gone wrong and the request/response will be logged by octokit
// it's possible this is a transient error and we should continue scanning
core.error(
"An unexpected error occured when sending code scanning status report."
"An unexpected error occurred when sending code scanning status report."
);
return true;
}

View file

@ -34,7 +34,7 @@ export function printPathFiltersWarning(
!config.languages.every(isInterpretedLanguage)
) {
logger.warning(
'The "paths"/"paths-ignore" fields of the config only have effect for Javascript and Python'
'The "paths"/"paths-ignore" fields of the config only have effect for JavaScript and Python'
);
}
}

View file

@ -187,7 +187,7 @@ test("download codeql bundle cache with different version cached (not pinned)",
});
});
test('download codeql bundle cache with pinned different version cached if "latests" tools specified', async (t) => {
test('download codeql bundle cache with pinned different version cached if "latest" tools specified', async (t) => {
await util.withTmpDir(async (tmpDir) => {
util.setupActionsVars(tmpDir, tmpDir);

View file

@ -192,7 +192,7 @@ export async function installPythonDeps(codeql: CodeQL, logger: Logger) {
const scriptsFolder = path.resolve(__dirname, "../python-setup");
// Setup tools on the Github hosted runners
// Setup tools on the GitHub hosted runners
if (process.env["ImageOS"] !== undefined) {
try {
if (process.platform === "win32") {

View file

@ -19,7 +19,7 @@ import {
getGitHubVersion,
getMemoryFlag,
getThreadsFlag,
parseGithubUrl,
parseGitHubUrl,
getGitHubAuth,
setupActionsVars,
} from "./util";
@ -166,7 +166,7 @@ program
const apiDetails = {
auth,
externalRepoAuth: auth,
url: parseGithubUrl(cmd.githubUrl),
url: parseGitHubUrl(cmd.githubUrl),
};
const gitHubVersion = await getGitHubVersion(apiDetails);
@ -400,7 +400,7 @@ program
const apiDetails = {
auth,
url: parseGithubUrl(cmd.githubUrl),
url: parseGitHubUrl(cmd.githubUrl),
};
const outputDir =
@ -486,7 +486,7 @@ program
);
const apiDetails = {
auth,
url: parseGithubUrl(cmd.githubUrl),
url: parseGitHubUrl(cmd.githubUrl),
};
try {
const gitHubVersion = await getGitHubVersion(apiDetails);

View file

@ -185,9 +185,9 @@ export async function getCombinedTracerConfig(
);
}
// On macos it's necessary to prefix the build command with the runner exectuable
// On macos it's necessary to prefix the build command with the runner executable
// on order to trace when System Integrity Protection is enabled.
// The exectuable also exists and works for other platforms so we output this env
// The executable also exists and works for other platforms so we output this env
// var with a path to the runner regardless so it's always available.
const runnerExeName = process.platform === "win32" ? "runner.exe" : "runner";
mainTracerConfig.env["CODEQL_RUNNER"] = path.join(

View file

@ -125,62 +125,62 @@ test("getExtraOptionsEnvParam() fails on invalid JSON", (t) => {
process.env.CODEQL_ACTION_EXTRA_OPTIONS = origExtraOptions;
});
test("parseGithubUrl", (t) => {
t.deepEqual(util.parseGithubUrl("github.com"), "https://github.com");
t.deepEqual(util.parseGithubUrl("https://github.com"), "https://github.com");
test("parseGitHubUrl", (t) => {
t.deepEqual(util.parseGitHubUrl("github.com"), "https://github.com");
t.deepEqual(util.parseGitHubUrl("https://github.com"), "https://github.com");
t.deepEqual(
util.parseGithubUrl("https://api.github.com"),
util.parseGitHubUrl("https://api.github.com"),
"https://github.com"
);
t.deepEqual(
util.parseGithubUrl("https://github.com/foo/bar"),
util.parseGitHubUrl("https://github.com/foo/bar"),
"https://github.com"
);
t.deepEqual(
util.parseGithubUrl("github.example.com"),
util.parseGitHubUrl("github.example.com"),
"https://github.example.com/"
);
t.deepEqual(
util.parseGithubUrl("https://github.example.com"),
util.parseGitHubUrl("https://github.example.com"),
"https://github.example.com/"
);
t.deepEqual(
util.parseGithubUrl("https://api.github.example.com"),
util.parseGitHubUrl("https://api.github.example.com"),
"https://github.example.com/"
);
t.deepEqual(
util.parseGithubUrl("https://github.example.com/api/v3"),
util.parseGitHubUrl("https://github.example.com/api/v3"),
"https://github.example.com/"
);
t.deepEqual(
util.parseGithubUrl("https://github.example.com:1234"),
util.parseGitHubUrl("https://github.example.com:1234"),
"https://github.example.com:1234/"
);
t.deepEqual(
util.parseGithubUrl("https://api.github.example.com:1234"),
util.parseGitHubUrl("https://api.github.example.com:1234"),
"https://github.example.com:1234/"
);
t.deepEqual(
util.parseGithubUrl("https://github.example.com:1234/api/v3"),
util.parseGitHubUrl("https://github.example.com:1234/api/v3"),
"https://github.example.com:1234/"
);
t.deepEqual(
util.parseGithubUrl("https://github.example.com/base/path"),
util.parseGitHubUrl("https://github.example.com/base/path"),
"https://github.example.com/base/path/"
);
t.deepEqual(
util.parseGithubUrl("https://github.example.com/base/path/api/v3"),
util.parseGitHubUrl("https://github.example.com/base/path/api/v3"),
"https://github.example.com/base/path/"
);
t.throws(() => util.parseGithubUrl(""), {
t.throws(() => util.parseGitHubUrl(""), {
message: '"" is not a valid URL',
});
t.throws(() => util.parseGithubUrl("ssh://github.com"), {
t.throws(() => util.parseGitHubUrl("ssh://github.com"), {
message: '"ssh://github.com" is not a http or https URL',
});
t.throws(() => util.parseGithubUrl("http:///::::433"), {
t.throws(() => util.parseGitHubUrl("http:///::::433"), {
message: '"http:///::::433" is not a valid URL',
});
});

View file

@ -189,7 +189,7 @@ export function getCodeQLDatabasePath(tempDir: string, language: Language) {
* Parses user input of a github.com or GHES URL to a canonical form.
* Removes any API prefix or suffix if one is present.
*/
export function parseGithubUrl(inputUrl: string): string {
export function parseGitHubUrl(inputUrl: string): string {
const originalUrl = inputUrl;
if (inputUrl.indexOf("://") === -1) {
inputUrl = `https://${inputUrl}`;
@ -247,7 +247,7 @@ export async function getGitHubVersion(
apiDetails: GitHubApiDetails
): Promise<GitHubVersion> {
// We can avoid making an API request in the standard dotcom case
if (parseGithubUrl(apiDetails.url) === GITHUB_DOTCOM_URL) {
if (parseGitHubUrl(apiDetails.url) === GITHUB_DOTCOM_URL) {
return { type: GitHubVariant.DOTCOM };
}

View file

@ -23,7 +23,7 @@ queries:
uses: Anthophila/go-querypack@master
- name: Cpp queries
uses: Anthophila/cpp-querypack@second-branch
- name: Javascript queries
- name: JavaScript queries
uses: Anthophila/javascript-querypack/show_ifs2.ql@master
- name: Python queries
uses: Anthophila/python-querypack/show_ifs2.ql@second-branch

View file

@ -1,6 +1,6 @@
/**
* @name Show Javascript Ifs
* @description Show Javascript Ifs
* @name Show JavaScript Ifs
* @description Show JavaScript Ifs
* @kind problem
* @id inrepo-javascript-querypack/show-ifs
*/