Skip to content

Commit

Permalink
Merge pull request CocoaPods#126 from CocoaPods/rubocop-common
Browse files Browse the repository at this point in the history
[Rubocop] Use a .rubocop-cocoapods.yml config file common to all CP repos
  • Loading branch information
fabiopelosin committed May 3, 2014
2 parents cf4d5cd + 6d01f74 commit 1b2b767
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 63 deletions.
61 changes: 61 additions & 0 deletions .rubocop-cocoapods.yml
@@ -0,0 +1,61 @@
AllCops:
Include:
- Rakefile
Exclude:
- spec/fixtures/**

#- CocoaPods -----------------------------------------------------------------#

# We adopted raise instead of fail.
SignalException:
EnforcedStyle: only_raise

# They are idiomatic
AssignmentInCondition:
Enabled: false

# Allow backticks
AsciiComments:
Enabled: false

# Indentation clarifies logic branches in implementations
IfUnlessModifier:
Enabled: false

# No enforced convention here.
SingleLineBlockParams:
Enabled: false

# We only add the comment when needed.
Encoding:
Enabled: false

#- CocoaPods support for Ruby 1.8.7 ------------------------------------------#

HashSyntax:
EnforcedStyle: hash_rockets

Lambda:
Enabled: false


#- CocoaPods specs -----------------------------------------------------------#

# Allow for `should.match /regexp/`.
AmbiguousRegexpLiteral:
Exclude:
- spec/**

# Allow `object.should == object` syntax.
Void:
Exclude:
- spec/**

ClassAndModuleChildren:
Exclude:
- spec/**

UselessComparison:
Exclude:
- spec/**

70 changes: 7 additions & 63 deletions .rubocop.yml
@@ -1,70 +1,14 @@
AllCops:
Include:
- Rakefile
Exclude:
- lib/cocoapods-core/vendor/**
- spec/fixtures/**

inherit_from: rubocop-todo.yml

#- CocoaPods -----------------------------------------------------------------#

# We adopted raise instead of fail.
SignalException:
EnforcedStyle: only_raise

# They are idiomatic
AssignmentInCondition:
Enabled: false

# Allow backticks
AsciiComments:
Enabled: false

# Indentation clarifies logic branches in implementations
IfUnlessModifier:
Enabled: false

# No enforced convention here.
SingleLineBlockParams:
Enabled: false

# We only add the comment when needed.
Encoding:
Enabled: false

#- CocoaPods support for Ruby 1.8.7 ------------------------------------------#

HashSyntax:
EnforcedStyle: hash_rockets

Lambda:
Enabled: false
inherit_from:
- rubocop-todo.yml
- .rubocop-cocoapods.yml

#- Core -----------------------------------------------------------------------

#- CocoaPods specs -----------------------------------------------------------#

# Allow for `should.match /regexp/`.
AmbiguousRegexpLiteral:
Exclude:
- spec/**

# Allow `object.should == object` syntax.
Void:
Exclude:
- spec/**

ClassAndModuleChildren:
AllCops:
Exclude:
- spec/**

#- Core -----------------------------------------------------------------------
- spec/fixtures/**
- lib/cocoapods-core/vendor/**

FileName:
Exclude:
- lib/cocoapods-core.rb

UselessComparison:
Exclude:
- spec/**

0 comments on commit 1b2b767

Please sign in to comment.