atomlinter / linter-rubocop Goto Github PK
View Code? Open in Web Editor NEWLinter plugin for Ruby, using rubocop
License: MIT License
Linter plugin for Ruby, using rubocop
License: MIT License
Ever since updating to the latest version of linter-rubocop
, this error pops up on each save:
Error: warning: parser/current is loading parser/ruby21, which recognizes
warning: 2.1.6-compliant syntax, but you are running 2.1.5.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
{"metadata":{"rubocop_version":"0.32.1","ruby_engine":"ruby","ruby_version":"2.1.5","ruby_patchlevel":"273","ruby_platform":"x86_64-darwin14.0"},"files":[{"path":"../../../../../../var/folders/0_/w17vx8mx5kvgqzhbd59d06qm0000gn/T/69387008a68292900467c23649af55cd91149aacf3403caf7d602e1c7f15c4d4","offenses":[]}],"summary":{"offense_count":0,"target_file_count":1,"inspected_file_count":1}}
at /Users/tim/.atom/packages/linter-rubocop/index.coffee:42:27
at FSReqWrap.oncomplete (fs.js:77:15)
I get the same warning running rubocop from the command line, but it never previously appeared as an error popup in the editor.
It looks like the latest version of the plugin tries to append stderr to stdout and parse the entire thing as JSON. I suppose that's what triggers the internal error in Atom.
https://github.com/AtomLinter/linter-rubocop/blob/master/index.coffee#L39
https://github.com/AtomLinter/linter-rubocop/blob/master/index.coffee#L41
I would like to see the following feature:
Since rubocop can auto-correct some linter offenses, it would be great if CMD-clicking on an issue would trigger rubocop with the options:
-a --only $COP ...
This would allow selectively auto-correcting some linter warnings in case the cop supports auto-correct.
What would be necessary to achieve this? To get the cop-names there is the -D
flag, so i guess all the information is there.
I would be willing to help.
Uncaught Error: spawn /Users/tvoet/.rbenv/shims/rubocop ENOENT
Atom Version: 0.156.0
System: Mac OS X 10.10.1
Thrown From: Atom Core
At events.js:85
Error: spawn /Users/tvoet/.rbenv/shims/rubocop ENOENT
at exports._errnoException (util.js:742:11)
at Process.ChildProcess._handle.onexit (child_process.js:1051:32)
at child_process.js:1142:20
at process._tickCallback (node.js:378:11)
We're in the process of replacing linter
with a rewrite. Our central issue for tracking the plan is https://github.com/AtomLinter/linter-plus/issues/29. We're working hard to make this a smooth transition for you and for your users.
Please let us know here if you'd prefer to do the work yourself. If you have any questions or concerns please join us in our room on gitter.
When running Rubocop from the command line I don't receive errors, however, on pretty much every ruby file I am consistently getting the Rubocop error Use snake_case for source file names
.
Sample ruby file that demonstrates the error
class Plan < ActiveRecord::Base
end
Screenshot showing the error
Using:
Config::unobserve no longer does anything. Call .dispose()
on the object returned by Config::observe instead.
Config.unobserve (/Applications/Atom.app/Contents/Resources/app.asar/src/config.js:1060:19)
LinterRubocop.destroy (/Users/Percipio/.atom/packages/linter-rubocop/lib/linter-rubocop.coffee:36:16)
LinterView.remove (/Users/Percipio/.atom/packages/linter/lib/linter-view.coffee:252:6)
<unknown> (/Users/Percipio/.atom/packages/linter/lib/linter-view.coffee:124:7)
Config::unobserve no longer does anything. Call .dispose()
on the object returned by Config::observe instead.
Config.unobserve (/Applications/Atom.app/Contents/Resources/app.asar/src/config.js:1060:19)
LinterRubocop.destroy (/Users/ryoutakoganezawa/.atom/packages/linter-rubocop/lib/linter-rubocop.coffee:36:16)
LinterView.remove (/Users/ryoutakoganezawa/.atom/packages/linter/lib/linter-view.coffee:252:6)
<unknown> (/Users/ryoutakoganezawa/.atom/packages/linter/lib/linter-view.coffee:124:7)
Atom editor produced this warning message:
Config::unobserve no longer does anything. Call .dispose()
on the object returned by Config::observe instead.
Config.unobserve (/Applications/Atom.app/Contents/Resources/app.asar/src/config.js:1060:19)
LinterRubocop.destroy (/Users/jnagro/.atom/packages/linter-rubocop/lib/linter-rubocop.coffee:36:16)
LinterView.remove (/Users/jnagro/.atom/packages/linter/lib/linter-view.coffee:252:6)
<unknown> (/Users/jnagro/.atom/packages/linter/lib/linter-view.coffee:124:7)
I have two different computers, both having the Atom folder synched via symlinks over dropbox.
With absolute paths to a Rubocop installation, everything works fine. For one computer, the other one is spawning a lot of read warning boxes.
Long story short, ~/.rvm/gems/ruby-2.2.0/bin/rubocop
doens't seem to work. Or am I doing something wrong?
I think you want to change this back to linter-rubocop
, do you? ;) https://github.com/AtomLinter/linter-rubocop/blob/master/index.coffee#L67
Error
at C:\Users\gerardo.atom\packages\linter-rubocop\index.coffee:48:27
at FSReqWrap.oncomplete (fs.js:77:15)
This error happens when path to rubocop
binary is missing or invalid. I installed a few packages at the same time and it took me a while to find out which one was causing this error. Wouldn't it be possible to throw some more detailed error message if rubocop
binary can't be found?
Hi,
In my particular case, at work we are maintaining a big rails application developed in Ruby 1.8.7. However, we want to follow the recommendations from Rubocop (which does not support 1.8.7, but 1.9.3). We have some rules configured for our 1.8.7 version.
The problem is that in atom I was receiving this issue message (Obtained from the Linter debug option):
stderr /Users/baraza/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems.rb:900:in `report_activate_error': Could not find RubyGem rubocop (>= 0) (Gem::LoadError)
from /Users/baraza/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
from /Users/baraza/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems.rb:1276:in `gem'
from /Users/baraza/.rvm/gems/ruby-1.9.3-p551/bin/rubocop:22
from /Users/baraza/.rvm/gems/ree-1.8.7-2012.02/bin/ruby_executable_hooks:15
Then I decided to set the command (cmd
) to execute directly on the linter-rubocop.coffee
file. And also, not set up the rubocopExecutablePath
config option.
cmd: '/Users/baraza/.rvm/rubies/ruby-1.9.3-p551/bin/ruby /Users/baraza/.rvm/gems/ruby-1.9.3-p551/bin/rubocop --format emacs'
However, this will bring another problem. The GEM_PATH
environmental variable is not set:
stderr /Users/baraza/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:315:in `to_specs': Could not find 'rubocop' (>= 0) among 151 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/baraza/.rvm/gems/ree-1.8.7-2012.02:/Users/baraza/.rvm/gems/ree-1.8.7-2012.02@global', execute `gem env` for more information
from /Users/baraza/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:324:in `to_spec'
from /Users/baraza/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /Users/baraza/.rvm/gems/ruby-1.9.3-p551/bin/rubocop:22:in `<main>'
Finally, I solved this issue in the init.coffee
adding this line to the activate function.
activate: ->
console.log 'activate linter-rubocop'
process.env['GEM_PATH'] = ['/Users/baraza/.rvm/gems/ruby-1.9.3-p551', process.env['GEM_PATH']].join(':')
Now, I would like to maybe create a fork and solve this issue in a more elegant way. Does anybody has a recommendation on how to proceed with this? I thought about creating an optional config variable for the GEM_PATH, Ruby and Rubocop.
Thank you all for this great plugin.
Carlos.
The newest version of linter has removed some things that linter-rubocop once used, such as findFile.
I'm getting an uncaught error (spawn ENOTDIR) whenever I open a new .rb file.
activate linter-rubocop init.coffee:6
Window load time: 4431ms /Applications/Atom.app/Contents/Resources/app/src/window-bootstrap.js:18
Uncaught Error: spawn ENOTDIR child_process.js:1017
Uncaught Error: spawn ENOTDIR util.js:682
exports._errnoException util.js:682
ChildProcess.spawn child_process.js:1017
exports.spawn child_process.js:801
BufferedProcess /Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:25
Linter.lintFile linter.coffee:114
(anonymous function) linter-view.coffee:133
(anonymous function) fs.js:97
Uncaught Error: spawn ENOTDIR child_process.js:1017
I am using Mac OSX mavericks version 10.9.5. This unfortunately makes rubocop a huge hassel to use! I wish that I could help but I am still just learning the basics of programming.
The console pops up taking up a significant portion of the screen and i get this error below. I had trouble uploading the screen shot I took so i just had to copy paste sorry.
activate linter-rubocop /Users/wjordan213/.atom/packages/linter-rubocop/lib/init.coffee:7
Window load time: 1714ms index.js:46
3Uncaught Error: This TextEditor has been destroyed /Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:989
Uncaught Error: This TextEditor has been destroyed /Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:989module.exports.DisplayBuffer.screenPositionForBufferPosition /Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:989module.exports.Marker.getHeadScreenPosition /Applications/Atom.app/Contents/Resources/app/src/marker.js:211Marker /Applications/Atom.app/Contents/Resources/app/src/marker.js:45module.exports.DisplayBuffer.getMarker /Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1188module.exports.DisplayBuffer.markBufferRange /Applications/Atom.app/Contents/Resources/app/src/display-buffer.js:1220module.exports.TextEditor.markBufferRange /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1216LinterView.display linter-view.coffee:180LinterView.processMessage linter-view.coffee:159(anonymous function) linter-view.coffee:1(anonymous function) linter-view.coffee:142Linter.processMessage linter.coffee:151(anonymous function) linter.coffee:127BufferedProcess.triggerExitCallback /Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:52(anonymous function) /Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:59(anonymous function) /Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:105emit events.js:129(anonymous function) net.js:461
Hi, When starting atom, linter-rubocop is throwing errors about not being able to find rubocop on my path but from the same shell i launch atom, rubocop shows up just fine. Here are some of the errors in my log:
[7973:1215/090226:INFO:renderer_main.cc(204)] Renderer process started
[7832:1215/090226:INFO:CONSOLE(100)] "Uncaught BufferedProcessError: Failed to spawn command rubocop
. Make sure rubocop
is installed and on your PATH", source: /opt/atom/resources/app/src/buffered-process.js (100)
[7832:1215/090226:INFO:CONSOLE(100)] "Uncaught BufferedProcessError: Failed to spawn command ruby
. Make sure ruby
is installed and on your PATH", source: /opt/atom/resources/app/src/buffered-process.js (100)
[7832:1215/090226:INFO:CONSOLE(100)] "Uncaught BufferedProcessError: Failed to spawn command rubocop
. Make sure rubocop
is installed and on your PATH", source: /opt/atom/resources/app/src/buffered-process.js (100)
[7832:1215/090226:INFO:CONSOLE(100)] "Uncaught BufferedProcessError: Failed to spawn command ruby
. Make sure ruby
is installed and on your PATH", source: /opt/atom/resources/app/src/buffered-process.js (100)
[7832:1215/090227:INFO:CONSOLE(100)] "Uncaught BufferedProcessError: Failed to spawn command rubocop
. Make sure rubocop
is installed and on your PATH", source: /opt/atom/resources/app/src/buffered-process.js (100)
[7832:1215/090227:INFO:CONSOLE(100)] "Uncaught BufferedProcessError: Failed to spawn command ruby
. Make sure ruby
is installed and on your PATH", source: /opt/atom/resources/app/src/buffered-process.js (100)
[7832:1215/090227:INFO:CONSOLE(100)] "Uncaught BufferedProcessError: Failed to spawn command rubocop
. Make sure rubocop
is installed and on your PATH", source: /opt/atom/resources/app/src/buffered-process.js (100)
[7832:1215/090227:INFO:CONSOLE(100)] "Uncaught BufferedProcessError: Failed to spawn command ruby
. Make sure ruby
is installed and on your PATH", source: /opt/atom/resources/app/src/buffered-process.js (100)
[8122:1215/090324:INFO:renderer_main.cc(204)] Renderer process started
Any ideas?
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.
When you open Atom not from the command line, it doesn't inherit PATH. This means that it won't have access to RVM things. The only way I found to solve this was, or just using the command line, or installing a system ruby version with rubocop.
I think that readme should be updated.
[Enter steps to reproduce below:]
...
...
Atom Version: 1.0.0
System: Linux Mint
Thrown From: Atom Core
Stack Trace
Rubocop command is not found.
At When you don't install rubocop yet, Run gem install rubocop
first.
If you already installed rubocop, Please check package setting at Rubocop Command Path
.
undefined
Commands
Config
{
"core": {
"themes": [
"atom-light-ui",
"atom-dark-syntax"
],
"disabledPackages": [
"ruby-slim",
"ruby-slim",
"ruby-slim",
"linter"
]
},
"editor": {
"invisibles": {},
"showIndentGuide": true,
"showInvisibles": true,
"softWrap": true,
"softWrapAtPreferredLineLength": true
}
}
Installed Packages
linter-rubocop, v0.2.7
linter-ruby, v0.1.6
rubocop-auto-correct, v1.0.0
No dev packages
Config::unobserve no longer does anything. Call .dispose()
on the object returned by Config::observe instead.
Config.unobserve (/Applications/Atom.app/Contents/Resources/app.asar/src/config.js:1060:19)
LinterRubocop.destroy (/Users/keiter/.atom/packages/linter-rubocop/lib/linter-rubocop.coffee:36:16)
LinterView.remove (/Users/keiter/.atom/packages/linter/lib/linter-view.coffee:252:6)
<unknown> (/Users/keiter/.atom/packages/linter/lib/linter-view.coffee:124:7)
Just upgraded to 0.103.0 of Atom. Now, whenever I open a .rb
file I get this error:
Uncaught Error: spawn EACCES util.js:682
exports._errnoException util.js:682
ChildProcess.spawn child_process.js:1017
exports.spawn child_process.js:801
BufferedProcess /Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:25
Linter.lintFile linter.coffee:114
(anonymous function) linter-view.coffee:133
(anonymous function) fs.js:97
I have installed linter-rubocop and gave the rubocop path and it is not working on Atom 1.0.0. I am using linter-ruby alternatively.
Recently I've started experiencing a problem where linter-rubocop runs rubocop against erb files.
Running rubocop
from the command line, erb files are skipped as expected.
Is this a known problem? If so is there any workaround for it? I tried adding app/views
to the list of excluded files, but I suspect rubocop ignores this when linter-rubocop passes in the filename explicitly.
Thanks,
Paul.
When I start Atom whit the package installed I get this:
Use a config schema instead. See the configuration section of https://atom.io/docs/latest/hacking-atom-package-word-count and https://atom.io/docs/api/latest/Config for more details
Called 1 time
Package.activateConfig - /opt/atom/resources/app/src/package.js:250:11
Package.activateNow - /opt/atom/resources/app/src/package.js:221:14
Use activationCommands instead of activationEvents in your package.json Commands should be grouped by selector as follows:
"activationCommands": {
"atom-workspace": ["foo:bar", "foo:baz"],
"atom-text-editor": ["foo:quux"]
}
Called 1 time
Package.getActivationCommands - /opt/atom/resources/app/src/package.js:764:9
Package.hasActivationCommands - /opt/atom/resources/app/src/package.js:689:20
Why do I have to keep changing the Rubocop Executable path whenever I move to another project using a different ruby version shouldn't it still work?
AtomLinter v0.X.Y API has been deprecated. Please refer to the Linter docs to update and the latest API: https://github.com/AtomLinter/Linter/wiki/Migrating-to-the-new-API
Object.activate (/Users/egon/.atom/packages/linter/lib/main.coffee:57:8)
Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:240:19)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:221:30)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:165:15)
Package.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:213:14)
PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:452:21)
The Package does not have a depency to linter and it took me a while to figure that out. So it would be great if you could add it.
It works flawlessly with [email protected], but when using 1.3.0 it just does nothing, no errors are reported and only a deprecation is shown as per #50.
If there is some way I can help debug it please let me know, I'm not really very up to date with developing (and debugging) for Atom, but the developer tools' console doesn't show any error.
I'm running on OSX Yosemite (10.10.3) with various ruby versions (all showing the same behavior) installed with rbenv.
AtomLinter v0.X.Y API has been deprecated. Please refer to the Linter docs to update and the latest API: https://github.com/AtomLinter/Linter/wiki/Migrating-to-the-new-API
LinterRubocop.Linter (/Users/josh/.atom/packages/linter/lib/linter.coffee:60:4)
new LinterRubocop (/Users/josh/.atom/packages/linter-rubocop/lib/linter-rubocop.coffee:25:4)
Object.lint (/Users/josh/.atom/packages/linter/lib/legacy.coffee:61:21)
<unknown> (/Users/josh/.atom/packages/linter/lib/editor-linter.coffee:69:25)
currentLinter (/Users/josh/.atom/packages/linter/lib/editor-linter.coffee:68:19)
<unknown> (/Users/josh/.atom/packages/linter/lib/editor-linter.coffee:82:22)
(Approximately) the first non-comment line of every ruby file is marked:
"Use snake_case for source file names"
on all ruby files .
Regardless of whether the file is snake case, e.g. "foo.rb" or "foo_bar.rb".
Edited for formatting.
This is an edge-case that happens when you configure Rubocop to check Gemfile
. It passes on the command line, but fails in Atom with "Use snake_case for source file names."
The check in Rubocop is written so that any filenames that are explicitly included in the configuration are considered "good" and ignored:
https://github.com/bbatsov/rubocop/blob/master/lib/rubocop/cop/style/file_name.rb#L14
return if config.file_to_include?(file_path)
This fails when run within Atom because it uses a temporary file, which doesn't match the glob **/Gemfile
.
stdout /var/folders/18/3c9l9tvs5qv9kjg_1nkxtp6m0000gn/T/AtomLinter114111-58971-gmptoasource.ruby.rails/Gemfile:1:1: C: Use snake_case for source file names.
Paths are computed relative to the Rubocop config file, so maybe one solution to this could be to copy the config file to the tmp directory, too, and run it from there. If that sounds like an OK solution to the maintainers, I can work up a patch.
I get the following error
Uncaught Error: ENOENT: no such file or directory, stat '~/.rvm/gems/ruby-2.2.2/bin/rubocop --force-exclusion'
Atom Version: 0.207.0
System: Mac OS X 10.10.3
Thrown From: linter package, v0.12.6
Error
at ~/.atom/packages/linter-rubocop/index.coffee:45:27
at FSReqWrap.oncomplete (fs.js:77:15)
Linter - v1.4.3
Linter-rubocop - v0.3.2
Rubocop - v0.33.0
Quite simply, it doesn't seem to do anything at all with linter
1.3.0. Everything works properly if I revert to 1.2.4.
Config::unobserve no longer does anything. Call .dispose()
on the object returned by Config::observe instead.
Config.unobserve (/Applications/Atom.app/Contents/Resources/app/src/config.js:1045:19)
LinterRubocop.destroy (/Users/angelbotto/.atom/packages/linter-rubocop/lib/linter-rubocop.coffee:36:16)
/Users/jaresty/.rvm/gems/ruby-2.1.2/bin/rubocop --format emacs /var/folders/2_/7s_9bc4s5q586np5tmjh3tn80000gr/T/114421-34324-5q1bi0source.ruby
[Enter steps to reproduce below:]
--one
Atom Version: 0.194.0
System: Mac OS X 10.10.3
Thrown From: linter-rubocop package, v0.2.2
Uncaught TypeError: undefined is not a function
At /Users/ash/.atom/packages/linter-rubocop/lib/linter-rubocop.coffee:36
TypeError: undefined is not a function
at LinterRubocop.destroy (/Users/ash/.atom/packages/linter-rubocop/lib/linter-rubocop.coffee:36:17)
at LinterView.remove (/Users/ash/.atom/packages/linter/lib/linter-view.coffee:252:7)
at /Users/ash/.atom/packages/linter/lib/linter-view.coffee:124:8
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at TextEditor.module.exports.TextEditor.destroyed (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:279:27)
at TextEditor.module.exports.Model.destroy (/Applications/Atom.app/Contents/Resources/app.asar/src/model.js:45:58)
at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:444:18)
at Pane.module.exports.Pane.destroyActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:419:12)
at Workspace.module.exports.Workspace.destroyActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:582:35)
at Workspace.module.exports.Workspace.destroyActivePaneItemOrEmptyPane (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:621:21)
at atom-workspace.atom.commands.add.core:close (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace-element.js:307:30)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:519:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:354:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:178:20)
-1:16.8.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-base16-tomorrow-dark-theme.theme-atom-dark-ui)
2x -0:08.1.0 core:close (atom-text-editor.editor.vim-mode.command-mode.is-focused)
{
"core": {
"disabledPackages": [
"atom-spark-core",
"welcome",
"save-session",
"preview",
"color-picker"
],
"themes": [
"atom-dark-ui",
"base16-tomorrow-dark-theme"
],
"audioBeep": false,
"followSymlinks": true,
"projectHome": "/Users/ash/personal"
}
}
# User
Atom-Syntax-highlighting-for-Sass, v0.5.0
angularjs, v0.1.0
atom-alignment, v0.12.0
autocomplete-paths, v1.0.2
autocomplete-plus, v2.12.0
editorconfig, v1.0.0
file-icons, v1.5.4
git-tab-status, v1.7.0
highlight-line, v0.10.2
highlight-selected, v0.9.2
jsonlint, v1.1.0
language-arduino, v0.2.1
language-docker, v1.1.3
language-haml, v0.19.0
language-ini, v1.10.0
language-salt, v0.2.0
linter, v0.12.1
linter-rubocop, v0.2.2
linter-ruby, v0.1.4
minimap, v4.7.6
minimap-color-highlight, v4.1.0
minimap-find-and-replace, v4.2.0
minimap-git-diff, v4.1.2
minimap-highlight-selected, v4.2.1
minimap-selection, v4.2.0
open-in-sourcetree, v0.1.2
open-last-project, v0.4.1
pretty-json, v0.3.3
project-manager, v1.15.5
rspec, v0.1.9
set-syntax, v0.2.1
symbols-tree-view, v0.9.2
vim-mode, v0.44.0
# Dev
No dev packages
…in a custom location.
I see RuboCop is not installed
in status bar now all of a sudden, it is installed, and I put the path to executable in settings. It was working fine but then it stopped working. I am not sure if this is a caused by atom-lint
or linter-rubocop
itself. Please advise.
Hi,
When working with a lot of RoR projects that some of them has rubocop gem and others not, when open some project that does not have rubocop, a lot of warnings are popped out, there is some way to prevent it?
Thanks.
Now it works only in Ruby, I think it should work also in Ruby on Rails syntax highlighting.
Also, what about if running on Ruby on Rails to add -R
option to rubocop to check Rails cops. More information you can find here https://github.com/bbatsov/rubocop#rails
My issue is similar to #61 - it used to work but it's broken with recent versions. I use chruby
and specify the executable path explicitly /Users/mrfoto/.gem/ruby/2.2.2/bin/rubocop
. But every file I open I get the following error popups and rubocop is not linting:
Error: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in to_specs': Could not find 'rubocop' (>= 0) among 8 total gem(s) (Gem::LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:into_spec' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in gem' from /Users/mrfoto/.gem/ruby/2.2.2/bin/rubocop:22:in
'
Error: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not find 'rubocop' (>= 0) among 8 total gem(s) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /Users/mrfoto/.gem/ruby/2.2.2/bin/rubocop:22:in `<main>'
at /Users/mrfoto/.atom/packages/linter-rubocop/index.coffee:42:27
at FSReqWrap.oncomplete (fs.js:77:15)
So it is finding the right rubocop as this happens from line 22 of it but it still accesses some system paths where rubocop (or anything else) is not present.
It works if I manually add /Users/Dan/.gem/ruby/2.0.0/bin/rubocop
absolute path under Settings (i.e to config.cson
, but why when all of the other linter-
packages find the $GEM_HOME/bin
directory just fine as it is in my $PATH
(and I know that Atom sees my $PATH because as mentioned, other packages that rely on it work fine).
OS X Yosemite 10.10.4
Atom 1.0.0
linter 1.1.0
linter-rubocop 0.2.7
I've got a .rubocop.yml file in the repo I'm working on which is fine when running rubocop from the command line or vim.
This is somewhat similar to #61 but I get a different Error Message.
I'm use Atom 1.0.5 on OS X 10.10.4
This started happening after I upgraded from 0.2.6 to 0.3.1. I don't know if 0.3.0 has the same problem.
Currently, this plugin uses the emacs formatting mode. If it were to switch to the json parsing mode, you gain a few things that you couldn't do otherwise:
The biggest attraction for me is the display of cop names
Currently, no settings are displayed in the package card view for linter-rubocop in Settings:
Since unlike all of the JS linters, linter-rubocop has an external dependency that must be configured (since the default is null
), it should expose rubocopExecutablePath
in settings-view to make it more obvious and accessible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.