Comments (14)
What about emulating linter-eslint
behaviour? it reports the error in the Linter messages below:
In this way the user gets the error without getting spammed, and everyone wins
from linter-rubocop.
I didn't try but there's a faster workaround: delete the .rubocop.yml
inside the gem folder
from linter-rubocop.
I'd completely forgotten about that solution 🤦♂, thanks for bringing it up!
from linter-rubocop.
What about emulating
linter-eslint
behaviour? it reports the error in the Linter messages below:In this way the user gets the error without getting spammed, and everyone wins
I am working on this.
from linter-rubocop.
Personally I'm strongly against this, how is the package supposed to tell the difference between when you simply haven't setup the environment correctly, or when you are operating in a purposely broken environment?
I'd recommend simply running Linter: Toggle Active Editor
to temporarily disable running on the file when you are working in this purposely broken environment. However... I don't use this provider myself so I'll leave it up to @AtomLinter/linter-rubocop to decided the best course of action 😉.
from linter-rubocop.
@Arcanemagus well, you don't expect any UI extension to spam popups for every file you click and every line you edit, do you?
I'm not saying that the error should be discarded, I'm saying that could be reported without blowing the UI, or at least that an option for that would be appreciated
(Actually I suggested to silently fail but as @Arcanemagus noticed it's probably too much brutal, I'm just removing that in favour of shell reporting)
from linter-rubocop.
Why not to remove the .rubocop.yml
file and check the Disable when no .rubocop.yml config file is found
configuration option?
from linter-rubocop.
Because they are gems and they come with .rubocop.yml
. You could say "but gem releasers should keep that file out of the gem", but unfortunately it isn't very common.
from linter-rubocop.
Let me understand your environment setup, What is the purpose of setting bundle exec rubocop
as Rubocop command? are you using rvm
or rbenv
? Are you running Atom from the command line with a specific gemset previously loaded?
from linter-rubocop.
@vzamanillo thank you for your effort.
What is the purpose of setting
bundle exec rubocop
as Rubocop command?
bundle exec rubocop
is set because I work on many projects and there is a different version of Rubocop for each project, so I can't assume that the latest Rubocop version installed works (I already had cases where different Rubocop versions produced different results).
are you using
rvm
orrbenv
?
I use asdf
.
Are you running Atom from the command line with a specific gemset previously loaded?
Yes, I often run bundle open some_gem
in order to inspect gems and even edit them. bundle open some_gem
opens Atom because I have the following env var set: EDITOR=/usr/bin/atom
.
from linter-rubocop.
@vzamanillo thank you for your effort.
You are welcome
bundle exec rubocop
is set because I work on many projects and there is a different version of Rubocop for each project, so I can't assume that the latest Rubocop version installed works (I already had cases where different Rubocop versions produced different results).
That is the main problem, this linter is not prepared to do that (#21, #283), in fact, assumes that you are working with the same and latest Rubocop for linting all your projects.
I use
asdf
.
I didn't ear about asdf
, thank you for the info.
Yes, I often run
bundle open some_gem
in order to inspect gems and even edit them.bundle open some_gem
opens Atom because I have the following env var set:EDITOR=/usr/bin/atom
.
Will not installing rubocop in your active gemset solve the problem?
I perfectly understand your proposal because the popup is an infinite spam, but the inclusion of a configuration option to report to console does not solve the real problem, is a temporal solution.
Let me think about other possible solutions.
from linter-rubocop.
Maybe the answer is looking at prior art. There are multitudes of Rubocop plugins we could check out the source for?
from linter-rubocop.
this linter is not prepared to do that (#21, #283), in fact, assumes that you are working with the same and latest Rubocop for linting all your projects
I must say that using bundle exec rubocop
this is the only issue I've encountered so far
Will not installing rubocop in your active gemset solve the problem?
Well, I don't know what is an active gemset. Do you mean running bundle
in the gem folder?
from linter-rubocop.
Well, I don't know what is an active gemset. Do you mean running
bundle
in the gem folder?
Yes.
from linter-rubocop.
Related Issues (20)
- switching on --autocorrect HOT 1
- Performance Cops will be removed from RuboCop 0.68 HOT 17
- chruby - Unable to parse rubocop version from command output: .0.67.2 (note leading dot) HOT 2
- Minimum Atom version too low HOT 10
- No rule doc available HOT 1
- Rubocop 0.72.0 changes documentation URL breaking specs HOT 2
- Error running RuboCop - Layout errors HOT 18
- Exclude flag not respected HOT 2
- CI is broken after Rubocop release 0.76 HOT 1
- Cannot read property 'stdout' of null HOT 5
- Use `bundler` to execute Rubocop configuration option does not check if bundler exists HOT 1
- Opiton to disable popup messages for the current line HOT 1
- Linter shows formatted offense documentation HOT 1
- Project-specific commands HOT 1
- False positive: Use snake_case for source file names on all Ruby files HOT 14
- Unnecessary running lint on .erb HOT 1
- Action Required: Fix Renovate Configuration
- Support for Command Substitution HOT 2
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linter-rubocop.