Open bekicot opened 7 years ago
.rubocop.yml
automatically. If you don't specify a config file, the bear is meant to generate one on its own, taking more specific settings like max_class_length
, max_method_length
or variable_naming_convention
from the coafile (you can lookup those in the bear description)..rubocop.yml
?@Makman2 The first one is kind of feature request. As coala should use the rubocop default config.
Here is the content of rubocop.yml
inherit_gem:
jekyll: .rubocop.yml
AllCops:
Exclude:
- lib/jekyll-admin/public/**/*
- src/**/*
- node_modules/**/*
Metrics/BlockLength:
Enabled: false
```+
I can take up the First Request, make RuboCopBear check the present directory for rubocop.yml Is that to be done?
@bekicot I would decline the first issue as a feature request on first sight (sorry :3), because coala's idea currently is to be the one and only interface for all codestyle tools. Especially the workaround is very easy, just specify .rubocop.yml
as the rubocop_config
. Also it would clash a bit with the current "feature" of coala to generate it's own rubocop-yml-file which you can assemble using settings inside your coafile (see previous answer).
--> @nemaniarjun keep cool, there needs stuff to be discussed :)
@bekicot I assume the trailing backticks and +
do not belong to the yml-file :) Does your code already conform to your given codestyle definitions? If so coala won't say something, as everything is alright :) If not, would you mind sending me one of your files so I can test?
Here is the content of the rubocop.yml
inherit_gem:
jekyll: .rubocop.yml
AllCops:
Exclude:
- lib/jekyll-admin/public/**/*
- src/**/*
- node_modules/**/*
Metrics/BlockLength:
Enabled: false
https://github.com/jekyll/jekyll-admin/blob/master/.rubocop.yml
As you can see there is inherited rules come from https://github.com/jekyll/jekyll/blob/master/.rubocop.yml
I mean one of your code files you try to lint/analyze :)
There is 2 issue i found.
i tried to not use
rubocop_config
and it doesn't pick up default rubocop config, although it exist in the root project directoryI also tried to add
rubocop_config
and set the value to default rubocop config file, it doesnt pick up the rules specifiedI also print the
args
variable in theRubocopBear.py
(After i addrubocop_config
in coafile) here is the resultsI'm not python programmer, but hopefully that helps
Here is the project i tried to add coafile http://github.com/jekyll/jekyll-admin