New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Rubocop] Use a .rubocop-cocoapods.yml config file common to all CP repos #126
Conversation
…P-common rules, so that we start using a common .rubocop-cocoapods.yml across all CP repos See discussion in CocoaPods/cocoapods-plugins#17
- spec/** | ||
|
||
#- Core ----------------------------------------------------------------------- | ||
- spec/fixtures/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I didn't find a way to move this spec/fixtures/**
exclusion to .rubocop-cocoapods.yml
because as soon as we give a new value to the AllCops/Exclude/
YAML key the whole key is overriden (meaning that there is no concat
between the AllCops/Exclude/
inherited array and the one here, but just a plain replacement).
Open for ideas on this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe adding a pattern like lib/**/vendor/**
for the AllCops/Exclude
key in .rubocop-cocoapods.yml
would work and do what we expect from this exclusion?
So that we could remove this key from the repo-specific .rubocop.yml
config file and avoid the problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan to remove the vendor stuff so I won't bother too much about it.
Side note: Maybe we could use this occasion to change the require 'rubocop/rake_task'
Rubocop::RakeTask.new do |task|
task.fail_on_error = true
end |
…oapods.yml` common rules config file even if it has to be repeated in the .rubocop.yml config file if we need to add other exclusions (like `lib/*/vendor/**`)
Reminder: also take https://github.com/CocoaPods/trunk.cocoapods.org/blob/master/.rubocop.yml into account when we build the |
👍 |
We should have a place where to store the canonical Ace work! |
Great idea. Where should be put it? Having a dedicated repo for this seems overkill, so maybe use the one from CocoaPods/Core here as a reference for all others? |
Great idea, the reference should be in |
Ok then I will let you guys do it, as I am not familiar with the Rainforest environment yet and how to do this in a clean way without breaking it all 😉 |
👍 |
[Rubocop] Use a .rubocop-cocoapods.yml config file common to all CP repos
[Rubocop] Use a .rubocop-cocoapods.yml config file common to all CP repos
As discussed in CocoaPods/cocoapods-plugins#17 (specifically here)
Trying to split the rubocop rules to have rules specific to CocoaPods/Core separated to rules that should be common to all CP repos, like CocoaPods/CocoaPods but also CP plugins.
This way we could have every CP repo
inherit_from
the same.rubocop-cocoapods.yml
and then only throw their specific rules/c @dbgrandi @irrationalfab