Allow RuboCop hints for non-ruby files
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2k
- Forks
- 281
- Avg merge
- 2h 14m
- Merged PRs (30d)
- 6
Description
This feature is VS Code specific
- VS Code specific
Use case
Somewhat recently RuboCop introduced 3rd-party templating support, where extensions can extract ruby code from files that RuboCop would normally not understand. https://github.com/rubocop/rubocop/pull/10839
A few examples are
- https://github.com/r7kamura/rubocop-erb
- https://github.com/r7kamura/rubocop-haml
- https://github.com/r7kamura/rubocop-slim
- https://github.com/rubocop/rubocop-md (this one predates the extension api and does its own thing, though still relevant)
- https://github.com/bobf/rubocop-rspec-documentation
Description
I want inline RuboCop hints for non-ruby files.
Implementation
I'm not sure how this works, currently there is no request fired when opening an erb file for example. So the extension probably needs to advertise on which extensions it can function. I'm not sure how that would work with arbitrary extensions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the VS Code extension requests diagnostics when opening an ERB file, since the issue says no request is currently fired. Review the linked RuboCop templating extensions and determine how the extension could advertise supported non-Ruby file extensions. Done means inline RuboCop hints work for supported non-Ruby files without breaking Ruby files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100