Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Linter rubocop not lintering. #44

Closed
aecorredor opened this issue Jun 11, 2015 · 29 comments
Closed

Linter rubocop not lintering. #44

aecorredor opened this issue Jun 11, 2015 · 29 comments

Comments

@aecorredor
Copy link

As the title says it, simply nothing happens as I type code. I tried most troubleshooting tips that you can find out there. Modifying cson file, uninstalling everything (including atom), opening from terminal, etc. Any help appreciated. thank you.

@consti
Copy link

consti commented Jun 12, 2015

my linter-rubocop failed silently because I had this extra line in my config.cson:

"linter-rubocop": {}

that just overloaded my previous settings. Removing the line helped. Maybe you missed that one?

@aecorredor
Copy link
Author

Hey thanks for answering. Unfortunately I did remove that line. I have the right executable path, and I am getting no errors whatsoever.

@untra
Copy link

untra commented Jun 13, 2015

I am also having this problem on a few of my machines. I've gotten linter-rubocop to work on a few machines, and I've seen it fail quietly like @aecorredor is mentioning on others. I'll see if I can find a clue between the installations.
edit: humor me; run in order

gem install rubocop
apm install linter
apm install linter-rubocop

Then doublecheck that the executable path corresponds with which rubocop. Does that get it going for you?

@THPubs
Copy link

THPubs commented Jun 15, 2015

Same issue here. The linter does not work anymore.

@consti
Copy link

consti commented Jun 15, 2015

For me, it helped to remove linter-rubocop from Atom (just clicking uninstall in the packages menu), then reinstall (in the packages menu), then check your config.cson and remove "linter-rubocop": {}.

@aecorredor
Copy link
Author

Hey guys, thanks for all the responses. I've tried @untra 's solution of running gem install rubocop, apm install linter, and apm linter-rubocop, and checking my exec. path and it is still not working. Also tried @consti 's solution, did not work either. My executable is /Users/Alejandro/.rvm/gems/ruby-2.2.1/bin/rubocop, I use the parent directory /Users/Alejandro/.rvm/gems/ruby-2.2.1/bin/ as the exec. path. Hope somebody else gets lucky. Let me know if you guys find a fix. Cheers.

@Riddlerrr
Copy link

+1 @aecorredor
Linux, atom 0.209
config.cson:

"*":
  editor:
    fontSize: 13
    invisibles: {}
    showInvisibles: true
    softWrap: true
    scrollPastEnd: true
  core:
    themes: [
      "atom-dark-ui"
      "atom-dark-syntax"
    ]
    ignoredNames: [
      ".git"
    ]
  "exception-reporting":
    userId: "4ef8ea16-af2d-d3bc-92f9-773e591398f8"
  welcome:
    showOnStartup: false
  "bracket-matcher": {}
  "save-session":
    dataSaveFolder: "/home/riddler/.atom/packages/save-session/projects"
  minimap: {}
  linter: {}
  "linter-rubocop":
    executablePath: "/home/riddler/.rvm/gems/ruby-2.1.3@alloka/bin"

rubocop work fine in terminal

@Riddlerrr
Copy link

I try linter-ruby. It work fine for me. What's wrong with linter-rubocop?

@esilverberg
Copy link

+1 I cannot get linter-rubocop working. I uninstalled everything and reinstalled via apm. I am running OSX Yosemite with Atom 0.210.0. linter-rubocop was the only reason I was using atom; I could never integrate it successfully with any other text editor.

@THPubs
Copy link

THPubs commented Jun 20, 2015

Did you check the rubocop config file? If you are using a custom config, check it for errors. Even a stray white space can cause issues.

@esilverberg
Copy link

It is somehow related to the presence of a .rubocop.yml file! If I have a blank .rubocop.yml file, it will not work in Atom; but when I remove the file it works. Originally my file was not blank and had valid exceptions in it. There must be some kind of regression parsing the .rubocop.yml file, either in rubocop, linter-rubocop, or both.

@jrissler
Copy link

+1 couldn't get working here either - tried previous steps other people had suggested.

After looking at it a bit more: removing linter: {} and saving config.cson - next time I restart, I see linter: {} back in - looks like its being auto added and may stop it from working (based on previous comments).

@aecorredor
Copy link
Author

bump. If anyone in the discussion found a solution please let us know. thanks.

@cirdes
Copy link

cirdes commented Jun 26, 2015

After linter last update(1.0.4), linter-rubocop is now working properly here.

@jrissler
Copy link

@cirdes confirmed here - good now also 👍

@aecorredor
Copy link
Author

Still not working for me...already updated everything. I don't know if there is something essential that I am not doing. It is suppose to lint as soon as I start typing in an rb file right? with ruby set as writing language too obviously right?

@khelll
Copy link

khelll commented Jun 28, 2015

+1 not working for rvm yet.

@aecorredor
Copy link
Author

So I found a fix, at least for me. I was using rvm before and I just switched to rbenv and now it's fully working. I guess if you don't mind not using rvm this is fine. cheers.

@kieranklaassen
Copy link

+1 not working with RVM for me too

@sheedhet
Copy link

I was able to get it working with RVM on OS X:

I was looking for an alternative when I found a clue here, I guess there's a problem with PATH and Atom needs to be opened via the command line at least once. I used the atom command from the app directory to launch the app, and now linter-rubocop is working. Wow that was frustrating!

Edit: looks like linter-rubocop requires launching from command line every time.

@kieranklaassen
Copy link

@sheedhet That solves it for me too. Although it would be nice to have it working without opening the atom with the directory via the terminal. 👍 Thanks!

@khelll
Copy link

khelll commented Jun 30, 2015

@sheedhet yes worked for me.

@mereghost
Copy link

Opening from the command line works fine, but IMO is a very lame workaround. =(

@consti
Copy link

consti commented Jul 1, 2015

This is a known issue with atom-lint and thus probably with linter: https://atom.io/packages/atom-lint#linter-executable-paths

I had to add the path to my rubocop file to the PATH variable in the atom init script.

@mneumark
Copy link

mneumark commented Jul 7, 2015

@sheedhet Worked! Thanks! Now I don't feel like I'm going crazy!
@hd-deman Any chance of a fix some time soon?

caseywebdev added a commit to caseywebdev/linter-rubocop that referenced this issue Jul 24, 2015
…Linter

Use JSON formatter, add additionalArguments param
caseywebdev added a commit to caseywebdev/linter-rubocop that referenced this issue Jul 25, 2015
caseywebdev added a commit to caseywebdev/linter-rubocop that referenced this issue Jul 25, 2015
@esilverberg
Copy link

FYI linter 1.3.0 seems to have broken it for me -- I downgraded back to 1.2.4 and it worked again.

@Eschon
Copy link

Eschon commented Aug 5, 2015

@esilverberg linter 1.3.0 removed a deprecated api that was still used by linter-rubocop. Until linter-rubocop switches to the new api you need to stay on 1.2.4 for it to work.

@infernalsirius
Copy link

It's working for me if I start it from the command line. Otherwise it's giving me errors.

@ssummers1
Copy link

Removed the line linter: {} from config.cson then it worked for me.

@aecorredor aecorredor changed the title Linter rubocop not linterting. Linter rubocop not lintering. Sep 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests