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

linter enhancements #747

Merged
merged 11 commits into from
Aug 30, 2021
Merged

linter enhancements #747

merged 11 commits into from
Aug 30, 2021

Conversation

williballenthin
Copy link
Collaborator

a number of semi-related enhancements to the linter:

  • add typing
  • add progress bar
  • add (in-memory) cache of analysis results per-path
  • don't display "find examples" if its the only violation for a nursery rule

all together, this should make the output much more readable while also being more performant (via the cache).

@williballenthin williballenthin added the enhancement New feature or request label Aug 27, 2021
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Please add bug fixes, new features, breaking changes and anything else you think is worthwhile mentioning to the master (unreleased) section of CHANGELOG.md. If no CHANGELOG update is needed add the following to the PR description: [x] No CHANGELOG update needed

@github-actions github-actions bot dismissed their stale review August 27, 2021 15:38

CHANGELOG updated or no update needed, thanks! 😄

@williballenthin
Copy link
Collaborator Author

we can see that by about 30% through the thorough linting, the cache is hit around 50% of the time, which is great!

image

Copy link
Collaborator

@mr-tz mr-tz left a comment

Choose a reason for hiding this comment

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

great improvements here!

# the OS occasionally kills the process due to memory usage.
# so, be extra aggressive in keeping memory usage down.
#
# tbh, im not sure this actually does anything, but maybe it helps?
Copy link
Collaborator

Choose a reason for hiding this comment

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

😄



@contextlib.contextmanager
def redirecting_print_to_tqdm():
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh neat, we should do this for capa main as well

@mr-tz mr-tz mentioned this pull request Aug 30, 2021
@mr-tz mr-tz merged commit dadd76b into master Aug 30, 2021
@mr-tz mr-tz deleted the feature-linter-pbar branch August 30, 2021 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants