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

feat: ignore minified JS files #1025

Merged
merged 1 commit into from
Jun 1, 2023
Merged

Conversation

elsapet
Copy link
Contributor

@elsapet elsapet commented Jun 1, 2023

Description

  • Ignore files ending in .min.js
  • Ignore files that are > 5KB in size but with no blank lines or comments (suspected minified JS)

To support blank line / comment count, we pass gocloc result down from earlier in scan process

Closes #747

Slight performance gain seen e.g. in discourse project using zsh =time. Both scans run with --debug on.

Ignoring minified JS files

      434.84 real      1970.71 user        82.92 sys

Currentmain

      453.66 real      2056.73 user        84.20 sys

Checklist

  • I've added test coverage that shows my fix or feature works as expected.
  • I've updated or added documentation if required.
  • I've included usage information in the description if CLI behavior was updated or added.
  • PR title follows Conventional Commits format

@elsapet elsapet requested review from cfabianski and didroe June 1, 2023 09:48
@elsapet elsapet force-pushed the feat/ignore-minified-js-files branch from 4aecf0a to bfdf967 Compare June 1, 2023 09:49
@elsapet elsapet force-pushed the feat/ignore-minified-js-files branch from bfdf967 to c4be58d Compare June 1, 2023 11:18
@elsapet elsapet marked this pull request as ready for review June 1, 2023 11:36
@elsapet elsapet merged commit 7f7a438 into main Jun 1, 2023
5 checks passed
@elsapet elsapet deleted the feat/ignore-minified-js-files branch June 1, 2023 11:37
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.

Handle minified JS files better
2 participants