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 support for erblint #3931

Merged
merged 7 commits into from
Oct 9, 2021
Merged

Add support for erblint #3931

merged 7 commits into from
Oct 9, 2021

Conversation

roelandmoors
Copy link
Contributor

Add support for erblint as asked in issue #3911

Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

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

Add a test for the handler method. See examples inside the test/handler folder.

ale_linters/eruby/erblint.vim Outdated Show resolved Hide resolved
ale_linters/eruby/erblint.vim Outdated Show resolved Hide resolved
Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

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

Thanks, looks good.

@hsanson hsanson merged commit 1ee7580 into dense-analysis:master Oct 9, 2021
@evenreven
Copy link

evenreven commented Oct 10, 2021

(Dumb) question: I tried it now and it works well (thank you both!), but is it meant to autofix as well the way the Rubocop linter/fixer does? Autofixing is supported by erblint, and the VS Code extension does it as well, but I get the There is no fixer named 'erblint' error when I try ALEFix. I have this in my .vimrc:

let g:ale_fixers = {
      \ '*': ['remove_trailing_lines', 'trim_whitespace'],
      \'scss': ['stylelint'],
      \'css': ['stylelint'],
      \'ruby': ['rubocop'],
      \'eruby': ['erblint'],
      \'javascript': ['prettier', 'eslint'],
      \'json': ['prettier'],
      \'slim': ['slim-lint'],
      \'yaml': ['prettier'],
      \'html': ['prettier'],
      \}

If it's out of scope for this PR, that's perfectly understandable.

@hsanson
Copy link
Contributor

hsanson commented Oct 10, 2021

@evenreven unfortunatelly this PR only adds erblint as a linter. Supporting it as fixer should not be difficult. Check the ale/autoload/ale/fixers/rubocop.vim file for a simple example.

@roelandmoors
Copy link
Contributor Author

yes, I only created the linter. Realized too late it could be used as fixer. Maybe I'll still add this if I find some time.

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.

None yet

3 participants