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
Use RuboCop config from cocoapods-core .rubocop.yml file #17
Conversation
I'm taking this one too. Should be good training for applying the conventions. One question however: how should we handle long lines that simply affect a very long string into a constant, like this one? PLUGINS_URL = 'https://raw.githubusercontent.com/CocoaPods/cocoapods.org/master/data/plugins.json' Should we write something like this instead? GITHUB_RAW_BASE_URL = 'https://raw.githubusercontent.com/'
PLUGINS_URL = GITHUB_RAW_BASE_URL + 'CocoaPods/cocoapods.org' \
'/master/data/plugins.json' Are there rules about indentation on this then, when we use a backslash and go on the next line to continue? |
TODO:
The |
Include: | ||
- Rakefile | ||
Exclude: | ||
- lib/cocoapods-core/vendor/** |
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.
We may have to customize this config a little bit. It could make sense to separate out local vs CP-common rubocop config if it's being adopted on all the projects.
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 started to do exactly that in CocoaPods/Core#126 so that we would have a .rubocop-cocoapods.yml
file that will be common across CP projects, and having .rubocop.yml
for each repo that simply inherit_from
it to start with.
LMK what you think about it.
…P-common rules, so that we start using a common .rubocop-cocoapods.yml across all CP repos See discussion in CocoaPods/cocoapods-plugins#17
Very nice! Be sure to also take https://github.com/CocoaPods/trunk.cocoapods.org/blob/master/.rubocop.yml into account, which is an app where I have been fine-tuning some settings to my taste as well. |
@alloy Thx, I will sure take a look at Feel free to compare it with CocoaPods/Core#126 as well and give some pointers there if you have any, so we can find a common ground for the shared |
Looks good to me. If somebody comes up with a way to share a common Rubocop configuration for all the CocoaPods repos that would be awesome. A solution would be to store it somewhere and add a rake task to update from the stored one and modify only that manually. This configuration could have a default inherited configuration specific for each repo similar to the TODO. |
I'm liking rubocop. |
Use RuboCop config from cocoapods-core .rubocop.yml file
@AliSoftware I made one small addition (listed you as an author) and pushed this out as the 0.1.1 gem. Thanks for all the work you put into this! |
Nice! |
D'oh, you are correct. |
* master: [travis-ci] Correctly set the LANG environment Trying to fix Travis build error with 'invalid byte sequence' Fix .travis.yml to add en_US.UTF8 locale Fixing Rakefile exception cases Fixing Rakefile's bootstrap [Specification::DSL] Introduce default_subspecs Update docs in DSL for podspec attribute. Fix wrong number on an issue reference in the changelog [DSL] Don't prepend the spec name to default_subspec Changelog and fixing a quote [Rubocop] Adding exclusion of `spec/fixtures/**` in the `.rubocop-cocoapods.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/**`) [Rubocop] trying to split CocoaPods/Core specific rubocop rules and CP-common rules, so that we start using a common .rubocop-cocoapods.yml across all CP repos See discussion in CocoaPods/cocoapods-plugins#17 Added missing space to acceptor Add labels to all the linter warnings and errors [Gemspec] Drop requirement for ActiveSupport < 4 Simplify URL validation. Validate URIs before making requests, only catch SocketErrors. Conflicts: CHANGELOG.md
…P-common rules, so that we start using a common .rubocop-cocoapods.yml across all CP repos See discussion in CocoaPods/cocoapods-plugins#17
* master: [travis-ci] Correctly set the LANG environment Trying to fix Travis build error with 'invalid byte sequence' Fix .travis.yml to add en_US.UTF8 locale Fixing Rakefile exception cases Fixing Rakefile's bootstrap [Specification::DSL] Introduce default_subspecs Update docs in DSL for podspec attribute. Fix wrong number on an issue reference in the changelog [DSL] Don't prepend the spec name to default_subspec Changelog and fixing a quote [Rubocop] Adding exclusion of `spec/fixtures/**` in the `.rubocop-cocoapods.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/**`) [Rubocop] trying to split CocoaPods/Core specific rubocop rules and CP-common rules, so that we start using a common .rubocop-cocoapods.yml across all CP repos See discussion in CocoaPods/cocoapods-plugins#17 Added missing space to acceptor Add labels to all the linter warnings and errors [Gemspec] Drop requirement for ActiveSupport < 4 Simplify URL validation. Validate URIs before making requests, only catch SocketErrors. Conflicts: CHANGELOG.md
No description provided.