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

Update README.md #390

Closed
wants to merge 1 commit into from
Closed

Update README.md #390

wants to merge 1 commit into from

Conversation

hjheath
Copy link

@hjheath hjheath commented Jan 3, 2025

Fix README example to disable rule at offense-level

Fix README example to disable rule at offense-level
@hjheath
Copy link
Author

hjheath commented Jan 3, 2025

I have signed the CLA!

@etiennebarrie
Copy link
Member

Thanks, the issue is that we haven't released a new version in a while, and you read main's README while using a different version. Here's a link for the latest released version: https://github.com/Shopify/erb_lint/blob/v0.7.0/README.md#disable-rule-at-offense-level

Both are supported since #385:

def self.rule_disable_comment_for_lines?(rule, lines)
lines.match?(/# erb_?lint:disable (?<rules>.*#{rule}).*/)
end
def self.disabled_rules(line)
line.match(/# erb_?lint:disable (?<rules>.*) %>/)&.named_captures&.fetch("rules")
end

@hjheath
Copy link
Author

hjheath commented Jan 6, 2025

Thanks, makes sense! I would love a version bump so no one else hits this 👍

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.

2 participants