JavaScript: Teach AutoBuild to exclude files from extraction by default.#510
Merged
semmle-qlci merged 1 commit intogithub:masterfrom Nov 21, 2018
Merged
Conversation
… by default . This adds default exclusion filters for `**/*.min.js` and `**/*-min.js` to the JavaScript auto-builder, meaning that files matching these patterns will no longer be extracted, unless they are re-included in the `.lgtm.yml` file. Alerts in minified code aren't shown by default anyway, so we can save ourselves some work by not analyzing them in the first place. While including minified files in the snapshot can in theory improve analysis results in non-minified files, this is likely to be rare in practice.
Contributor
|
LGTM I personally think we could go even further and exclude things like |
asger-semmle
approved these changes
Nov 21, 2018
cklin
pushed a commit
that referenced
this pull request
May 23, 2022
Add an example query for catching cases where defer is used in a loop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds default exclusion filters for
**/*.min.jsand**/*-min.jsto the JavaScript auto-builder, meaning that files matching these patterns will no longer be extracted, unless they are re-included in the.lgtm.ymlfile.Alerts in minified code aren't shown by default anyway, so we can save ourselves some work by not analyzing them in the first place. While including minified files in the snapshot can in theory improve analysis results in non-minified files, this is likely to be rare in practice, and of course the omitted files can always be re-included via
.lgtm.yml.As an extreme example, for https://github.com/docker/docker.github.io the number of extracted files drops from 466 to 377, while total analysis time goes down from 4895 seconds to 2660 seconds, all without affecting results (in non-minified files). Of course, for most other projects the effects are not going to be this dramatic.