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

Add strict locals linter #395

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Add strict locals linter #395

merged 1 commit into from
Jan 20, 2025

Conversation

simonlevasseur
Copy link
Contributor

@simonlevasseur simonlevasseur commented Jan 17, 2025

Closes #338

Implement the strict locals linter. It checks for any ERB entry that matches the following regex: \s+locals:\s+\((.*)\). The regex was made to match the Rails strict locals regex here. The "#" is omitted because the parser separates the indicator node from the code node.

@simonlevasseur simonlevasseur self-assigned this Jan 17, 2025
@simonlevasseur simonlevasseur force-pushed the strict-locals-linter branch 2 times, most recently from 9c88a47 to ee27743 Compare January 18, 2025 16:14
@simonlevasseur simonlevasseur requested review from a team, rafaelfranca and andrewn617 and removed request for a team January 20, 2025 15:23
Copy link

@andrewn617 andrewn617 left a comment

Choose a reason for hiding this comment

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

My mistake, it's not like rubocop.

@simonlevasseur simonlevasseur force-pushed the strict-locals-linter branch 2 times, most recently from 3f5d9c3 to 61c68fe Compare January 20, 2025 18:14
@simonlevasseur simonlevasseur merged commit a981931 into main Jan 20, 2025
13 checks passed
@simonlevasseur simonlevasseur deleted the strict-locals-linter branch January 20, 2025 18:37
@gmcgibbon gmcgibbon mentioned this pull request Jan 20, 2025
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.

New linter suggestion: Enforce strict locals
2 participants