Code Monkey home page Code Monkey logo

Comments (14)

mdesantis avatar mdesantis commented on August 28, 2024 2

What about emulating linter-eslint behaviour? it reports the error in the Linter messages below:

Schermata del 2019-06-21 15-43-58

In this way the user gets the error without getting spammed, and everyone wins

from linter-rubocop.

mdesantis avatar mdesantis commented on August 28, 2024 1

I didn't try but there's a faster workaround: delete the .rubocop.yml inside the gem folder

from linter-rubocop.

Arcanemagus avatar Arcanemagus commented on August 28, 2024 1

I'd completely forgotten about that solution 🤦‍♂, thanks for bringing it up!

from linter-rubocop.

vzamanillo avatar vzamanillo commented on August 28, 2024 1

What about emulating linter-eslint behaviour? it reports the error in the Linter messages below:

Schermata del 2019-06-21 15-43-58

In this way the user gets the error without getting spammed, and everyone wins

I am working on this.

from linter-rubocop.

Arcanemagus avatar Arcanemagus commented on August 28, 2024

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.

mdesantis avatar mdesantis commented on August 28, 2024

@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.

vzamanillo avatar vzamanillo commented on August 28, 2024

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.

mdesantis avatar mdesantis commented on August 28, 2024

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.

vzamanillo avatar vzamanillo commented on August 28, 2024

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.

mdesantis avatar mdesantis commented on August 28, 2024

@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 or rbenv?

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 avatar vzamanillo commented on August 28, 2024

@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.

maschwenk avatar maschwenk commented on August 28, 2024

Maybe the answer is looking at prior art. There are multitudes of Rubocop plugins we could check out the source for?

from linter-rubocop.

mdesantis avatar mdesantis commented on August 28, 2024

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.

vzamanillo avatar vzamanillo commented on August 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.