Comments (5)
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.
from linter-rubocop.
from linter-rubocop.
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.
This is fixed in 0.4.0
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
- Avoid opening error popups when rubocop is not found HOT 14
- 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.