Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow scans with packs for languages not being scanned #1116

Merged
merged 5 commits into from
Jun 24, 2022

Conversation

aeisenberg
Copy link
Contributor

@aeisenberg aeisenberg commented Jun 22, 2022

Previously, we were being too strict about checking that a pack's
language was being scanned. It was a failure if a pack language
was specified for a language not being scanned.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@aeisenberg aeisenberg requested a review from a team as a code owner June 22, 2022 20:07
src/config-utils.ts Show resolved Hide resolved
@@ -1168,7 +1168,8 @@ export function parsePacksFromConfig(
throw new Error(getPacksInvalid(configFile));
}
if (!languages.includes(lang as Language)) {
throw new Error(getPacksRequireLanguage(lang, configFile));
// This particular language is not being analyzed in this run.
continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that we won't fail on the pack with the wrong language, but we won't attempt to run the pack below either, right? A comment to that effect would be great.

@aeisenberg aeisenberg force-pushed the aeisenberg/multi-lang-packs branch 2 times, most recently from 6cc8292 to 4e14024 Compare June 22, 2022 20:37
@aeisenberg
Copy link
Contributor Author

Currently failing on the nightly builds. These should be fixed by github/codeql#9667. I am currently building a nightly release that should contain the fix.

Previously, we were being too strict about checking that a pack's
language was being scanned. It was a failure if a pack language
was specified for a language not being scanned.
@aeisenberg
Copy link
Contributor Author

@adityasharad can I get another look at this PR from you? I'd like to get this in the next release.

CHANGELOG.md Outdated Show resolved Hide resolved
@aeisenberg aeisenberg merged commit 47bcabd into main Jun 24, 2022
@aeisenberg aeisenberg deleted the aeisenberg/multi-lang-packs branch June 24, 2022 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants