rubocop: add shim and command.#10239
rubocop: add shim and command.#10239MikeMcQuaid merged 3 commits intoHomebrew:masterfrom MikeMcQuaid:rubocop-shim
Conversation
|
Review period will end on 2021-01-07 at 15:23:01 UTC. |
|
Just glancing at the changes (haven't tried anything locally yet) makes sense to me. My limited vscode experience tells me that we can provide a Another option might be to set up a specific workspace file. Then, maybe provide a And we also want to give users the ability to modify the configuration for themselves without creating unstaged changes or accidentally committing configuration things in a PR. |
|
Why wouldn't this be a developer command, @MikeMcQuaid? |
|
Upon running ❯ brew rubocop --version
warning: parser/current is loading parser/ruby26, which recognizes
warning: 2.6.6-compliant syntax, but you are running 2.6.3.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
1.7.0This warning also shows up in vscode unless To test, I ran I did notice that One thing to note: both of these require adding some extensions to vscode. Not sure if we can provide a settings file that includes those or not. I've also added a vscode settings file that works for me. Unfortunately, I couldn't figure out how to infer I also found that if A note on this approach: this will likely cause issues if users have their own As I said, I'm not really sure what the best way to do things here is, so feel free to just revert/drop if what I'm pushing isn't helpful at all. |
Yup, I think that's typical and expected.
It's not, it's because we're using an old Ruby version and RuboCop is complaining about it.
Yeh, that's expected but necessary if we're going to have the same e.g. Ruby logic.
We can 🎉
We could try a relative path from the workspace root (or use a workspace variable). I might be able to take a look at this but if I don't: no worries!
It could be.
No, this is really helpful!
Yup, thing that's just something we'll need to accept may cause one-off issues.
🎉 |
Add a shim and a command that can be used to easily add a single directory to your `PATH` (`Library/Homebrew/shims/gems`) and have it automatically install, configure and run `rubocop` so you can use it for in-editor integrations.
|
I've pushed fixes for all mentioned issues here. @Rylan12 can you see if this still works for you as expected? |
Rylan12
left a comment
There was a problem hiding this comment.
Awesome! Don't know why I didn't try a relative path...
Anyway, I tested locally and everything appears to work just fine for me. Plus, I learned about the endwise extension (very cool).
|
Review period ended. |
|
Thanks for the help @Rylan12! |
|
Thank you for getting this going! |
Add a shim and a command that can be used to easily add a single directory to your
PATH(Library/Homebrew/shims/gems) and have it automatically install, configure and runrubocopso you can use it for in-editor integrations.CC @Rylan12 who talked about this with me. ideally we'd/you'd add a commit to this PR with the Visual Studio Code configuration to run this
rubocop