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

Improve Performance by Adding LRU for ASTs and Fix Issue with Multiple Lines Between Heading and Tag #502

Merged
merged 4 commits into from
Nov 17, 2022

Conversation

pjkaufman
Copy link
Collaborator

Fixes #501
Relates to #488

Changes Made:

  • Added an LRU cache for AST parsing where the text content of the file is hashed to determine if we already have parsed the file before recently
  • The LRU allows for faster rule running since it can allow us to not need to parse files again if nothing has changed and the text is the same (i.e. not a new ignore pattern)
  • Updated the heading blank lines rule to not ignore tags as that is not needed and was causing the trailing new line character to get ignored with it causing a bug

@pjkaufman pjkaufman added the bug Something isn't working label Nov 17, 2022
@pjkaufman pjkaufman self-assigned this Nov 17, 2022
@pjkaufman pjkaufman merged commit 6da8c8b into platers:master Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: two blank lines will be inserted between headings and tags if enable heading-blank-lines with Bottom=true
1 participant