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 linters to load custom linters #178

Merged
merged 4 commits into from
Aug 13, 2020

Conversation

jen-taylor-shopify
Copy link

Closes #164

This PR builds on a suggestion by @etiennebarrie in this PR.

The goal is to update the linter_registry so that it also loads the custom linters when the options are parsed. This prevents not a valid linter name errors when attempting to run erb-lint with a specific custom linter:

$ bundle exec erblint --enable-linters custom_linter --lint-all
custom_linter: not a valid linter name (rubocop, rubocop_text, parser_errors, space_around_erb_tag, space_in_html_tag, extra_newline, right_trim, erb_safety, trailing_whitespace, closing_erb_tag_indent, space_indentation, hard_coded_string, no_javascript_tag_helper, allowed_script_type, self_closing_tag, final_newline, deprecated_classes)

A lot of the "why" is detailed in #164, but this seemed like the shortest lift.

@etiennebarrie
Copy link
Member

The test needs to be fixed, but it does help running a custom linter with --enable-linters.

@brendo brendo force-pushed the fix_issue-164-loaded-linters branch from f7a3a77 to 926f810 Compare August 11, 2020 04:08
Copy link
Member

@rafaelfranca rafaelfranca left a comment

Choose a reason for hiding this comment

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

:shipit:

@jen-taylor-shopify jen-taylor-shopify merged commit 10eddda into master Aug 13, 2020
@jen-taylor-shopify jen-taylor-shopify deleted the fix_issue-164-loaded-linters branch August 13, 2020 15:05
@exterm exterm temporarily deployed to production January 5, 2021 08:42 Inactive
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.

Loading Custom Linters is broken
6 participants