Merge pull request #673 from github/update-v1.0.10-fa18c606

Merge main into v1
This commit is contained in:
Henry Mercer 2021-08-03 10:05:43 +01:00 committed by GitHub
commit a00769bdfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 96 additions and 50 deletions

View file

@ -1,5 +1,9 @@
# CodeQL Action and CodeQL Runner Changelog
## 1.0.10 - 03 Aug 2021
- Fix an issue where a summary of diagnostics information from CodeQL was not output to the logs of the `analyze` step of the Action. [#672](https://github.com/github/codeql-action/pull/672)
## 1.0.9 - 02 Aug 2021
No user facing changes.

1
lib/codeql.js generated
View file

@ -487,6 +487,7 @@ function getCodeQLForCmd(cmd) {
"interpret-results",
threadsFlag,
"--format=sarif-latest",
"--print-diagnostics-summary",
"--print-metrics-summary",
"--sarif-group-rules-by-pack",
"-v",

File diff suppressed because one or more lines are too long

8
node_modules/.package-lock.json generated vendored
View file

@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "1.0.9",
"version": "1.0.10",
"lockfileVersion": 2,
"requires": true,
"packages": {
@ -1955,9 +1955,9 @@
}
},
"node_modules/eslint": {
"version": "7.31.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.31.0.tgz",
"integrity": "sha512-vafgJpSh2ia8tnTkNUkwxGmnumgckLh5aAbLa1xRmIn9+owi8qBNGKL+B881kNKNTy7FFqTEkpNkUvmw0n6PkA==",
"version": "7.32.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz",
"integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==",
"dev": true,
"dependencies": {
"@babel/code-frame": "7.12.11",

16
node_modules/eslint/CHANGELOG.md generated vendored
View file

@ -1,3 +1,19 @@
v7.32.0 - July 30, 2021
* [`3c78a7b`](https://github.com/eslint/eslint/commit/3c78a7bff6044fd196ae3b737983e6744c6eb7c8) Chore: Adopt `eslint-plugin/prefer-message-ids` rule internally (#14841) (Bryan Mishkin)
* [`faecf56`](https://github.com/eslint/eslint/commit/faecf56cdb4146b28bfa4f1980adb41b4d3614b1) Update: change reporting location for `curly` rule (refs #12334) (#14766) (Nitin Kumar)
* [`d7dc07a`](https://github.com/eslint/eslint/commit/d7dc07a15e256cee9232183165e2f6102f2c0873) Fix: ignore lines with empty elements (fixes #12756) (#14837) (Soufiane Boutahlil)
* [`1bfbefd`](https://github.com/eslint/eslint/commit/1bfbefdaaf19ef32df42b89a3f5d32cff1e5b831) New: Exit on fatal error (fixes #13711) (#14730) (Antonios Katopodis)
* [`ed007c8`](https://github.com/eslint/eslint/commit/ed007c82ee9d2170c87500d98303554b5f90b915) Chore: Simplify internal `no-invalid-meta` rule (#14842) (Bryan Mishkin)
* [`d53d906`](https://github.com/eslint/eslint/commit/d53d9064b9dd0dd6a8ea39e07b16310c8364db69) Docs: Prepare data for website to indicate rules with suggestions (#14830) (Bryan Mishkin)
* [`d28f2ff`](https://github.com/eslint/eslint/commit/d28f2ffb986e49d6da5c1d91215580591f4cfd35) Docs: Reference eslint-config-eslint to avoid potential for staleness (#14805) (Brett Zamir)
* [`8be8a36`](https://github.com/eslint/eslint/commit/8be8a36010145dfcd31cbdd4f781a91989e3b1bd) Chore: Adopt `eslint-plugin/require-meta-docs-url` rule internally (#14823) (Bryan Mishkin)
* [`f9c164f`](https://github.com/eslint/eslint/commit/f9c164f7b74ca73384c8c80eed5bdbe359b44f6c) Docs: New syntax issue template (#14826) (Nicholas C. Zakas)
* [`eba0c45`](https://github.com/eslint/eslint/commit/eba0c4595c126a91f700d5f2e8723ec3f820a830) Chore: assertions on reporting loc in `unicode-bom` (refs #12334) (#14809) (Nitin Kumar)
* [`ed945bd`](https://github.com/eslint/eslint/commit/ed945bd662714b1917e9de71d5b322a28be9161b) Docs: fix multiple broken links (#14833) (Sam Chen)
* [`60df44c`](https://github.com/eslint/eslint/commit/60df44c79b0f74406119c0c040a360ca84e721fc) Chore: use `actions/setup-node@v2` (#14816) (Nitin Kumar)
* [`6641d88`](https://github.com/eslint/eslint/commit/6641d88e17d952a8e51df5e0d3882a842d4c3f35) Docs: Update README team and sponsors (ESLint Jenkins)
v7.31.0 - July 17, 2021
* [`efdbb12`](https://github.com/eslint/eslint/commit/efdbb1227019427ec2d968a8d6e9151dd8a77c35) Upgrade: @eslint/eslintrc to v0.4.3 (#14808) (Brandon Mills)

10
node_modules/eslint/README.md generated vendored
View file

@ -254,6 +254,16 @@ Toru Nagashima
The people who review and fix bugs and help triage issues.
<table><tbody><tr><td align="center" valign="top" width="11%">
<a href="https://github.com/brettz9">
<img src="https://github.com/brettz9.png?s=75" width="75" height="75"><br />
Brett Zamir
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/bmish">
<img src="https://github.com/bmish.png?s=75" width="75" height="75"><br />
Bryan Mishkin
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/g-plane">
<img src="https://github.com/g-plane.png?s=75" width="75" height="75"><br />
Pig Fang

View file

@ -156,6 +156,9 @@ function calculateStatsPerFile(messages) {
return messages.reduce((stat, message) => {
if (message.fatal || message.severity === 2) {
stat.errorCount++;
if (message.fatal) {
stat.fatalErrorCount++;
}
if (message.fix) {
stat.fixableErrorCount++;
}
@ -168,6 +171,7 @@ function calculateStatsPerFile(messages) {
return stat;
}, {
errorCount: 0,
fatalErrorCount: 0,
warningCount: 0,
fixableErrorCount: 0,
fixableWarningCount: 0
@ -183,12 +187,14 @@ function calculateStatsPerFile(messages) {
function calculateStatsPerRun(results) {
return results.reduce((stat, result) => {
stat.errorCount += result.errorCount;
stat.fatalErrorCount += result.fatalErrorCount;
stat.warningCount += result.warningCount;
stat.fixableErrorCount += result.fixableErrorCount;
stat.fixableWarningCount += result.fixableWarningCount;
return stat;
}, {
errorCount: 0,
fatalErrorCount: 0,
warningCount: 0,
fixableErrorCount: 0,
fixableWarningCount: 0

13
node_modules/eslint/lib/cli.js generated vendored
View file

@ -131,14 +131,16 @@ function translateOptions({
*/
function countErrors(results) {
let errorCount = 0;
let fatalErrorCount = 0;
let warningCount = 0;
for (const result of results) {
errorCount += result.errorCount;
fatalErrorCount += result.fatalErrorCount;
warningCount += result.warningCount;
}
return { errorCount, warningCount };
return { errorCount, fatalErrorCount, warningCount };
}
/**
@ -314,9 +316,12 @@ const cli = {
if (await printResults(engine, resultsToPrint, options.format, options.outputFile)) {
// Errors and warnings from the original unfiltered results should determine the exit code
const { errorCount, warningCount } = countErrors(results);
const { errorCount, fatalErrorCount, warningCount } = countErrors(results);
const tooManyWarnings =
options.maxWarnings >= 0 && warningCount > options.maxWarnings;
const shouldExitForFatalErrors =
options.exitOnFatalError && fatalErrorCount > 0;
if (!errorCount && tooManyWarnings) {
log.error(
@ -325,6 +330,10 @@ const cli = {
);
}
if (shouldExitForFatalErrors) {
return 2;
}
return (errorCount || tooManyWarnings) ? 1 : 0;
}

6
node_modules/eslint/lib/options.js generated vendored
View file

@ -290,6 +290,12 @@ module.exports = optionator({
default: "true",
description: "Prevent errors when pattern is unmatched"
},
{
option: "exit-on-fatal-error",
type: "Boolean",
default: "false",
description: "Exit with exit code 2 in case of fatal error"
},
{
option: "debug",
type: "Boolean",

View file

@ -216,6 +216,8 @@ module.exports = {
previousItemToken = tokenAfterItem
? sourceCode.getTokenBefore(tokenAfterItem)
: sourceCode.ast.tokens[sourceCode.ast.tokens.length - 1];
} else {
previousItemToken = currentItemToken;
}
});

View file

@ -131,15 +131,6 @@ module.exports = {
return token.value === "else" && token.type === "Keyword";
}
/**
* Gets the `else` keyword token of a given `IfStatement` node.
* @param {ASTNode} node A `IfStatement` node to get.
* @returns {Token} The `else` keyword token.
*/
function getElseKeyword(node) {
return node.alternate && sourceCode.getFirstTokenBetween(node.consequent, node.alternate, isElseKeywordToken);
}
/**
* Determines whether the given node has an `else` keyword token as the first token after.
* @param {ASTNode} node The node to check.
@ -361,7 +352,7 @@ module.exports = {
if (this.expected) {
context.report({
node,
loc: (name !== "else" ? node : getElseKeyword(node)).loc.start,
loc: body.loc,
messageId: opts && opts.condition ? "missingCurlyAfterCondition" : "missingCurlyAfter",
data: {
name
@ -371,7 +362,7 @@ module.exports = {
} else {
context.report({
node,
loc: (name !== "else" ? node : getElseKeyword(node)).loc.start,
loc: body.loc,
messageId: opts && opts.condition ? "unexpectedCurlyAfterCondition" : "unexpectedCurlyAfter",
data: {
name

4
node_modules/eslint/package.json generated vendored
View file

@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "7.31.0",
"version": "7.32.0",
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
"description": "An AST-based pattern checker for JavaScript.",
"bin": {
@ -96,7 +96,7 @@
"ejs": "^3.0.2",
"eslint": "file:.",
"eslint-config-eslint": "file:packages/eslint-config-eslint",
"eslint-plugin-eslint-plugin": "^3.2.0",
"eslint-plugin-eslint-plugin": "^3.5.3",
"eslint-plugin-internal-rules": "file:tools/internal-rules",
"eslint-plugin-jsdoc": "^25.4.3",
"eslint-plugin-node": "^11.1.0",

18
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "codeql",
"version": "1.0.9",
"version": "1.0.10",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "codeql",
"version": "1.0.9",
"version": "1.0.10",
"license": "MIT",
"dependencies": {
"@actions/artifact": "^0.5.2",
@ -46,7 +46,7 @@
"@types/sinon": "^10.0.2",
"@typescript-eslint/parser": "^4.1.0",
"ava": "3.8.1",
"eslint": "^7.9.0",
"eslint": "^7.32.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-github": "^4.1.5",
"eslint-plugin-import": "^2.22.0",
@ -2009,9 +2009,9 @@
}
},
"node_modules/eslint": {
"version": "7.31.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.31.0.tgz",
"integrity": "sha512-vafgJpSh2ia8tnTkNUkwxGmnumgckLh5aAbLa1xRmIn9+owi8qBNGKL+B881kNKNTy7FFqTEkpNkUvmw0n6PkA==",
"version": "7.32.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz",
"integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==",
"dev": true,
"dependencies": {
"@babel/code-frame": "7.12.11",
@ -7426,9 +7426,9 @@
"version": "1.0.5"
},
"eslint": {
"version": "7.31.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.31.0.tgz",
"integrity": "sha512-vafgJpSh2ia8tnTkNUkwxGmnumgckLh5aAbLa1xRmIn9+owi8qBNGKL+B881kNKNTy7FFqTEkpNkUvmw0n6PkA==",
"version": "7.32.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz",
"integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==",
"dev": true,
"requires": {
"@babel/code-frame": "7.12.11",

View file

@ -1,6 +1,6 @@
{
"name": "codeql",
"version": "1.0.9",
"version": "1.0.10",
"private": true,
"description": "CodeQL action",
"scripts": {
@ -61,7 +61,7 @@
"@types/sinon": "^10.0.2",
"@typescript-eslint/parser": "^4.1.0",
"ava": "3.8.1",
"eslint": "^7.9.0",
"eslint": "^7.32.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-github": "^4.1.5",
"eslint-plugin-import": "^2.22.0",

View file

@ -1,6 +1,6 @@
{
"name": "codeql-runner",
"version": "1.0.9",
"version": "1.0.10",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -92,9 +92,9 @@
"dev": true
},
"@types/node": {
"version": "16.4.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.6.tgz",
"integrity": "sha512-FKyawK3o5KL16AwbeFajen8G4K3mmqUrQsehn5wNKs8IzlKHE8TfnSmILXVMVziAEcnB23u1RCFU1NT6hSyr7Q==",
"version": "16.4.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.10.tgz",
"integrity": "sha512-TmVHsm43br64js9BqHWqiDZA+xMtbUpI1MBIA0EyiBmoV9pcEYFOSdj5fr6enZNfh4fChh+AGOLIzGwJnkshyQ==",
"dev": true
},
"@webassemblyjs/ast": {
@ -415,9 +415,9 @@
}
},
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true
},
"caniuse-lite": {
@ -578,9 +578,9 @@
}
},
"electron-to-chromium": {
"version": "1.3.790",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.790.tgz",
"integrity": "sha512-epMH/S2MkhBv+Y0+nHK8dC7bzmOaPwcmiYqt+VwxSUJLgPzkqZnGUEQ8eVhy5zGmgWm9tDDdXkHDzOEsVU979A==",
"version": "1.3.792",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.792.tgz",
"integrity": "sha512-RM2O2xrNarM7Cs+XF/OE2qX/aBROyOZqqgP+8FXMXSuWuUqCfUUzg7NytQrzZU3aSqk1Qq6zqnVkJsbfMkIatg==",
"dev": true
},
"emoji-regex": {
@ -1973,9 +1973,9 @@
}
},
"webpack": {
"version": "5.47.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.47.0.tgz",
"integrity": "sha512-soKLGwcUM1R3YEbJhJNiZzy7T43TnI7ENda/ywfDp9G1mDlDTpO+qfc8I5b0AzMr9xM3jyvQ0n7ctJyiXuXW6Q==",
"version": "5.47.1",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.47.1.tgz",
"integrity": "sha512-cW+Mzy9SCDapFV4OrkHuP6EFV2mAsiQd+gOa3PKtHNoKg6qPqQXZzBlHH+CnQG1osplBCqwsJZ8CfGO6XWah0g==",
"dev": true,
"requires": {
"@types/eslint-scope": "^3.7.0",
@ -2000,7 +2000,7 @@
"tapable": "^2.1.1",
"terser-webpack-plugin": "^5.1.3",
"watchpack": "^2.2.0",
"webpack-sources": "^3.0.1"
"webpack-sources": "^3.1.1"
}
},
"webpack-cli": {
@ -2043,9 +2043,9 @@
}
},
"webpack-sources": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.0.4.tgz",
"integrity": "sha512-9bF13xKtYl13kHJTK8p63q4ktH9E2utn/sm+JHQGC5cYxo+9v5LRqjgStAsAdD4+Tzob+c4a0eK7LByhMPBrcA==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.0.tgz",
"integrity": "sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw==",
"dev": true
},
"which": {

View file

@ -1,6 +1,6 @@
{
"name": "codeql-runner",
"version": "1.0.9",
"version": "1.0.10",
"private": true,
"description": "CodeQL runner",
"scripts": {
@ -11,7 +11,7 @@
"devDependencies": {
"pkg": "^5.3.1",
"ts-loader": "9.2.4",
"webpack": "^5.47.0",
"webpack": "^5.47.1",
"webpack-cli": "^4.7.2"
}
}

View file

@ -754,6 +754,7 @@ function getCodeQLForCmd(cmd: string): CodeQL {
"interpret-results",
threadsFlag,
"--format=sarif-latest",
"--print-diagnostics-summary",
"--print-metrics-summary",
"--sarif-group-rules-by-pack",
"-v",