Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #232 from miqh/fix/204
Resolve violations of no-throw-literal lint
Chris Raynor authored and GitHub committed Sep 28, 2020

Unverified

No user is associated with the committer email.
2 parents f2e557e + 476bf86 commit bcf29b3
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
@@ -48,7 +48,6 @@
"github/no-then": "off",
"import/no-extraneous-dependencies": "off",
"no-shadow": "off",
"no-throw-literal": "off",
"no-useless-escape": "off",
"sort-imports": "off"
}
2 changes: 1 addition & 1 deletion lib/upload-lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/upload-lib.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/upload-lib.ts
@@ -26,7 +26,9 @@ export function combineSarifFiles(sarifFiles: string[]): string {
if (combinedSarif.version === null) {
combinedSarif.version = sarifObject.version;
} else if (combinedSarif.version !== sarifObject.version) {
throw `Different SARIF versions encountered: ${combinedSarif.version} and ${sarifObject.version}`;
throw new Error(
`Different SARIF versions encountered: ${combinedSarif.version} and ${sarifObject.version}`
);
}

combinedSarif.runs.push(...sarifObject.runs);

0 comments on commit bcf29b3

Please sign in to comment.