Skip to content

fix: skip autocorrect when parser errors are present - #473

Open
efegokdemir wants to merge 1 commit into
Shopify:mainfrom
efegokdemir:efe/avoid-autocorrect-on-parser-errors
Open

efegokdemir wants to merge 1 commit into
Shopify:mainfrom
efegokdemir:efe/avoid-autocorrect-on-parser-errors

Conversation

@efegokdemir

Copy link
Copy Markdown

Fixes #303. Parser recovery can leave an incomplete tree that makes another linter's autocorrection remove valid template markup. Skip corrections when the parser reports errors while keeping lint findings visible; the CLI regression reproduces SpaceInHtmlTag removing a <span> opener. bundle exec rspec passes (529 examples, 1 pending), and bundle exec rubocop --cache false passes (97 files). Local checks used Ruby 4.0.7 with a temporary dependency resolution because the locked Minitest version does not support Ruby 4.0.7; Gemfile.lock was restored.

This branch has not been deployed

No deployments
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.

Autocorrect should not run on files where ParserError fails

1 participant