Code Monkey home page Code Monkey logo

Comments (5)

Fustrate avatar Fustrate commented on August 27, 2024

It's actually already there. I edited the main Linter package to see the log, and here's the command it runs (without anything but the executable in the path):

/Users/steven/.rbenv/versions/2.2.2/bin/rubocop --force-exclusion --format emacs --config /Users/steven/Development/MyProject/.rubocop.yml /var/folders/5m/fw5tzfv51pn_182x0_1js9v80000gn/T/AtomLinter115529-76624-1w4doni/schema.rb

As far as I can tell, the exclusion problem (which is, I assume, why you're trying to add --force-exclusion) stems from using a completely different path to the file from the one Rubocop would exclude - and that's how the Linter package works. As far as Rubocop is concerned, it's just a file somewhere else on the system that has nothing to do with the files in the include/exclude paths, even if they share the same name. There's no .rubocop.yml in /var/folders/5m/fw5tzfv51pn_182x0_1js9v80000gn/T/AtomLinter115529-76624-1w4doni, and it doesn't even preserve the /db/ part of the path, so it's all sorts of wacky.

I'm not sure if this has to be "fixed" in rubocop, or the linter should parse the found .rubocop.yml file and not try to lint excluded files in the first place.

My findings can be tested by running these two commands from the project root (assuming it's a Rails app - replace db/schema.rb with any excluded file if not):

cp --parents db/schema.rb ~/Desktop
rubocop ~/Desktop/db/schema.rb --force-exclude --config .rubocop.yml

from linter-rubocop.

renchap avatar renchap commented on August 27, 2024

👍 this is a very annoying issues to not have the rubocop exclude rules applied inside atom, rendering the rubocop linter quite painful to use.

from linter-rubocop.

tony612 avatar tony612 commented on August 27, 2024

👍

from linter-rubocop.

bartocc avatar bartocc commented on August 27, 2024

Guys, can you review the PR #75 ?

To test it :

  • remove the official linter-rubocop package
  • clone my 'understand-exclude-parameters' branch
  • cd to the cloned repo
  • run apm link
  • add '--force-exclusion' to the Additional Arguments in the package's config
  • append/merge this in your .rubocop.yml config file
AllCops:
  Exclude:
    - '**/db/schema.rb'
  • open a "schema.rb" file in Atom, lint and see if you get errors or not

from linter-rubocop.

caseywebdev avatar caseywebdev commented on August 27, 2024

This is fixed in 0.4.0

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.