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

Editor support for Atom #45

Closed
searls opened this issue Dec 13, 2018 · 13 comments
Closed

Editor support for Atom #45

searls opened this issue Dec 13, 2018 · 13 comments
Labels
good first issue ⭐️ Good for newcomers help wanted 🙇‍♂️ Extra attention is needed tool integrations 🛠 Integrations with editors and tools

Comments

@searls
Copy link
Contributor

searls commented Dec 13, 2018

Talk to someone from AtomLinter and fork or extend linter-rubocop

@searls searls added help wanted 🙇‍♂️ Extra attention is needed good first issue ⭐️ Good for newcomers tool integrations 🛠 Integrations with editors and tools labels Dec 13, 2018
@tmikeschu
Copy link

👋 I'd like to work on this issue!

@searls searls assigned searls and unassigned searls Feb 9, 2019
@searls
Copy link
Contributor Author

searls commented Feb 9, 2019

TIL I can't assign people without commit bit.

@searls
Copy link
Contributor Author

searls commented Feb 9, 2019

Consider yourself assigned, Mike

@tmikeschu
Copy link

Haven't made any progress on this yet (ended up in a position with less free time 😢 ). Still hoping to contribute, but if someone sees this and wants to take a stab let me know.

@martinliptak
Copy link
Contributor

Actually, standardrb almost works with linter-rubocop out of the box. The only problem is the message that standardrb adds to rubocop output at the end.

Notice: Disagree with these rules? While StandardRB is pre-1.0.0, feel free to submit suggestions to:
  https://github.com/testdouble/standard/issues/new

@searls Could this be written to stderr rather than stdin? That could fix the issue because linter-rubocop parses only stdout.

https://github.com/AtomLinter/linter-rubocop/blob/master/src/index.js#L39

I've made a script that filters out the message and set linter-rubocop to use it as rubocop executable.

#!/bin/bash

bin/standardrb $@ | grep -v "Notice: " | grep -v "https://github.com/testdouble/standard/issues/new"

This is the result:

Screenshot 2019-03-22 at 5 29 55 PM

Seems to be working.

@martinliptak
Copy link
Contributor

martinliptak commented Mar 22, 2019

Screenshot 2019-03-22 at 5 39 17 PM

bin/standardrb-atom is the script that removes "Notice: ..." from the output. Writing the notice to stderr should make standardrb compatible with rubocop-linter and possibly other editors that work with rubocop. The user would just set rubocop-linter executable to bin/standardrb.

Will keep testing this to see if everything works.

@martinliptak
Copy link
Contributor

Alternatively, standardrb could detect --format json and hide notice.

@rosston
Copy link
Contributor

rosston commented Mar 22, 2019

Hm, there was an issue for fixing this: #53. I was under the impression that --format json disabled the "Notice: ..." message now due to #55 (landed in v0.0.23).

@martinliptak Does --format json still show that message for you?

@searls
Copy link
Contributor Author

searls commented Mar 22, 2019

Yes, make sure the gem is up-to-date! --format json no longer shows the notice. It was added to the standard built-in formatter quite a while ago

@martinliptak
Copy link
Contributor

Thank you @rosston and @searls

After updating the gem, standardrb works with linter-rubocop. The only thing I had to do was setting ./bin/standardrb as command in linter-rubocop settings.

Screenshot 2019-03-23 at 6 31 04 PM

Is this something you want to add to the How do I run standard in my editor? README section?

@searls
Copy link
Contributor Author

searls commented Mar 23, 2019

Yes, please send a PR!

@matt17r
Copy link

matt17r commented Aug 15, 2021

Can this be closed now? Instructions are clear and linter issues are flagged nicely.

@searls
Copy link
Contributor Author

searls commented Aug 15, 2021

Sure!

@searls searls closed this as completed Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue ⭐️ Good for newcomers help wanted 🙇‍♂️ Extra attention is needed tool integrations 🛠 Integrations with editors and tools
Projects
None yet
Development

No branches or pull requests

5 participants