Commit 4e4cf78b authored by Fabio Pelosin's avatar Fabio Pelosin

[RuboCop] Add

parent e30ea1a3
inherit_from:
- .rubocop_todo.yml
- .rubocop_cocoapods.yml
#- CocoaPods ------------------------------------------------------------------
AllCops:
Include:
- ./Rakefile
- ./Gemfile
- ./*.gemspec
Exclude:
- ./spec/fixtures/**/*
# At the moment not ready to be used
# https://github.com/bbatsov/rubocop/issues/947
Documentation:
Enabled: false
#- 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
# Having these make it easier to *not* forget to add one when adding a new
# value and you can simply copy the previous line.
TrailingComma:
EnforcedStyleForMultiline: comma
# Clashes with CLAide Command#validate!
GuardClause:
Enabled: false
# Not always desirable: lib/claide/command/plugins_helper.rb:12:15
Next:
Enabled: false
#- CocoaPods support for Ruby 1.8.7 ------------------------------------------#
HashSyntax:
EnforcedStyle: hash_rockets
Lambda:
Enabled: false
DotPosition:
EnforcedStyle: trailing
EachWithObject:
Enabled: false
Style/SpecialGlobalVars:
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/**/*
# This configuration was generated by `rubocop --auto-gen-config`
# on 2014-08-14 12:21:44 +0200 using RuboCop version 0.24.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 1
Lint/AmbiguousOperator:
Enabled: false
# Offense count: 4
Lint/BlockAlignment:
Enabled: false
# Offense count: 2
# Configuration parameters: AlignWith, SupportedStyles.
Lint/DefEndAlignment:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
Lint/DeprecatedClassMethods:
Enabled: false
# Offense count: 11
# Configuration parameters: AlignWith, SupportedStyles.
Lint/EndAlignment:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Lint/RescueException:
Enabled: false
# Offense count: 2
Lint/SpaceBeforeFirstArg:
Enabled: false
# Offense count: 5
# Cop supports --auto-correct.
Lint/StringConversionInInterpolation:
Enabled: false
# Offense count: 6
# Cop supports --auto-correct.
Lint/UnusedBlockArgument:
Enabled: false
# Offense count: 6
# Cop supports --auto-correct.
Lint/UnusedMethodArgument:
Enabled: false
# Offense count: 4
Lint/UselessAccessModifier:
Enabled: false
# Offense count: 32
Lint/UselessAssignment:
Enabled: false
# Offense count: 7
# Cop supports --auto-correct.
Style/Alias:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/AlignParameters:
Enabled: false
# Offense count: 4
# Cop supports --auto-correct.
Style/AndOr:
Enabled: false
# Offense count: 1
Style/BlockNesting:
Max: 4
# Offense count: 6
# Cop supports --auto-correct.
Style/Blocks:
Enabled: false
# Offense count: 49
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/BracesAroundHashParameters:
Enabled: false
# Offense count: 1
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/ClassAndModuleChildren:
Enabled: false
# Offense count: 12
# Configuration parameters: CountComments.
Style/ClassLength:
Max: 328
# Offense count: 1
# Cop supports --auto-correct.
Style/ClassMethods:
Enabled: false
# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: PreferredMethods.
Style/CollectionMethods:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/ColonMethodCall:
Enabled: false
# Offense count: 7
# Configuration parameters: Keywords.
Style/CommentAnnotation:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
Style/CommentIndentation:
Enabled: false
# Offense count: 12
Style/CyclomaticComplexity:
Max: 9
# Offense count: 1
# Cop supports --auto-correct.
Style/DeprecatedHashMethods:
Enabled: false
# Offense count: 1
Style/DoubleNegation:
Enabled: false
# Offense count: 24
# Cop supports --auto-correct.
Style/EmptyLines:
Enabled: false
# Offense count: 1
Style/EmptyLinesAroundAccessModifier:
Enabled: false
# Offense count: 164
# Cop supports --auto-correct.
Style/EmptyLinesAroundBody:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
Style/EmptyLiteral:
Enabled: false
# Offense count: 1
# Configuration parameters: Exclude.
Style/FileName:
Enabled: false
# Offense count: 1
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/For:
Enabled: false
# Offense count: 6
# Configuration parameters: AllowedVariables.
Style/GlobalVars:
Enabled: false
# Offense count: 17
# Cop supports --auto-correct.
Style/IndentArray:
Enabled: false
# Offense count: 20
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/IndentHash:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
Style/IndentationConsistency:
Enabled: false
# Offense count: 24
# Cop supports --auto-correct.
Style/IndentationWidth:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
Style/LeadingCommentSpace:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/LineEndConcatenation:
Enabled: false
# Offense count: 952
# Configuration parameters: AllowURI.
Style/LineLength:
Max: 1060
# Offense count: 18
# Cop supports --auto-correct.
Style/MethodCallParentheses:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/MethodDefParentheses:
Enabled: false
# Offense count: 104
# Configuration parameters: CountComments.
Style/MethodLength:
Max: 39
# Offense count: 1
Style/MultilineIfThen:
Enabled: false
# Offense count: 1
Style/MultilineTernaryOperator:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
Style/NegatedIf:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/NegatedWhile:
Enabled: false
# Offense count: 10
# Cop supports --auto-correct.
Style/NilComparison:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: IncludeSemanticChanges.
Style/NonNilCheck:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/Not:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowSafeAssignment.
Style/ParenthesesAroundCondition:
Enabled: false
# Offense count: 49
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/PerlBackrefs:
Enabled: false
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
Enabled: false
# Offense count: 3
# Cop supports --auto-correct.
Style/RedundantSelf:
Enabled: false
# Offense count: 12
# Configuration parameters: MaxSlashes.
Style/RegexpLiteral:
Enabled: false
# Offense count: 3
Style/SelfAssignment:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowIfMethodIsEmpty.
Style/SingleLineMethods:
Enabled: false
# Offense count: 9
# Cop supports --auto-correct.
Style/SingleSpaceBeforeFirstArg:
Enabled: false
# Offense count: 14
# Cop supports --auto-correct.
Style/SpaceAfterComma:
Enabled: false
# Offense count: 2
# Cop supports --auto-correct.
Style/SpaceAfterControlKeyword:
Enabled: false
# Offense count: 15
# Cop supports --auto-correct.
Style/SpaceAroundOperators:
Enabled: false
# Offense count: 13
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/SpaceBeforeBlockBraces:
Enabled: false
# Offense count: 2
# Cop supports --auto-correct.
Style/SpaceBeforeComma:
Enabled: false
# Offense count: 35
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
Style/SpaceInsideBlockBraces:
Enabled: false
# Offense count: 25
# Cop supports --auto-correct.
Style/SpaceInsideBrackets:
Enabled: false
# Offense count: 89
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
Style/SpaceInsideHashLiteralBraces:
Enabled: false
# Offense count: 40
# Cop supports --auto-correct.
Style/SpaceInsideParens:
Enabled: false
# Offense count: 1580
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/StringLiterals:
Enabled: false
# Offense count: 30
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/TrailingBlankLines:
Enabled: false
# Offense count: 86
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
Style/TrailingComma:
Enabled: false
# Offense count: 32
# Cop supports --auto-correct.
Style/TrailingWhitespace:
Enabled: false
# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
Style/TrivialAccessors:
Enabled: false
# Offense count: 10
# Cop supports --auto-correct.
Style/UnneededPercentQ:
Enabled: false
# Offense count: 1
# Configuration parameters: EnforcedStyle, SupportedStyles.
Style/VariableName:
Enabled: false
# Offense count: 19
# Cop supports --auto-correct.
Style/WordArray:
MinSize: 4
......@@ -37,6 +37,10 @@ group :development do
# https://github.com/lemurheavy/coveralls-ruby/blob/master/coveralls-ruby.gemspec#L23.
gem 'simplecov'
if RUBY_VERSION >= '1.9.3'
gem 'rubocop'
end
if RUBY_PLATFORM.include?('darwin')
# Make Xcodeproj faster
gem 'libxml-ruby'
......
GIT
remote: https://github.com/CocoaPods/CLAide.git
revision: 303b96021e0fdd0003a71f1f9bf6823a6262ba12
branch: master
specs:
claide (0.6.1)
GIT
remote: https://github.com/CocoaPods/Core.git
revision: 2e66303717d72b23a98ea5341dc5b627f3eb97e7
branch: master
PATH
remote: .
specs:
cocoapods-core (0.33.1)
activesupport (>= 3.2.15)
fuzzy_match (~> 2.0.4)
cocoapods (0.33.1)
activesupport (>= 3.2.15, < 4)
claide (~> 0.6.1)
cocoapods-core (= 0.33.1)
cocoapods-downloader (~> 0.6.1)
cocoapods-plugins (~> 0.2.0)
cocoapods-trunk (~> 0.1.4)
cocoapods-try (~> 0.3.0)
colored (~> 1.2)
escape (~> 0.0.4)
json_pure (~> 1.8)
nap (~> 0.5)
nap (~> 0.8)
open4 (~> 1.3)
xcodeproj (~> 0.18.0)
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
revision: 13733a36b29d2a9698c3e2563b52a0b6339e90df
branch: master
remote: https://github.com/ruby-prof/ruby-prof.git
revision: e3317c4bf0b58dceee86e5dd9cf03165fcfd964f
specs:
xcodeproj (0.18.0)
CFPropertyList (~> 2.2)
activesupport (~> 3.0)
colored (~> 1.2)
ruby-prof (0.15.1)
GIT
remote: https://github.com/CocoaPods/cocoapods-downloader.git
revision: 0e02c9da094a82c5049cbf7266d9eefef2fd5552
remote: https://github.com/CocoaPods/cocoapods-trunk.git
revision: 72e02a7ad3f429a6e76e602a238e91eb55c44165
branch: master
specs:
cocoapods-downloader (0.6.1)
cocoapods-trunk (0.1.4)
json_pure (~> 1.8)
nap (>= 0.6)
netrc
GIT
remote: https://github.com/CocoaPods/cocoapods-plugins.git
......@@ -42,45 +41,46 @@ GIT
nap
GIT
remote: https://github.com/CocoaPods/cocoapods-trunk.git
revision: 72e02a7ad3f429a6e76e602a238e91eb55c44165
remote: https://github.com/CocoaPods/cocoapods-try.git
revision: 754e53f3c3eec4c5ba129d6955484fb27631d1d5
branch: master
specs:
cocoapods-trunk (0.1.4)
json_pure (~> 1.8)
nap (>= 0.6)
netrc
cocoapods-try (0.3.0)
GIT
remote: https://github.com/CocoaPods/cocoapods-try.git
revision: 754e53f3c3eec4c5ba129d6955484fb27631d1d5
remote: https://github.com/CocoaPods/cocoapods-downloader.git
revision: 0e02c9da094a82c5049cbf7266d9eefef2fd5552
branch: master
specs:
cocoapods-try (0.3.0)
cocoapods-downloader (0.6.1)
GIT
remote: https://github.com/ruby-prof/ruby-prof.git
revision: e3317c4bf0b58dceee86e5dd9cf03165fcfd964f
remote: https://github.com/CocoaPods/CLAide.git
revision: 303b96021e0fdd0003a71f1f9bf6823a6262ba12
branch: master
specs:
ruby-prof (0.15.1)
claide (0.6.1)
PATH
remote: .
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
revision: de7a0fa64bc9a0d72278b4d384539ce748df6220
branch: master
specs:
cocoapods (0.33.1)
activesupport (>= 3.2.15, < 4)
claide (~> 0.6.1)
cocoapods-core (= 0.33.1)
cocoapods-downloader (~> 0.6.1)
cocoapods-plugins (~> 0.2.0)
cocoapods-trunk (~> 0.1.4)
cocoapods-try (~> 0.3.0)
xcodeproj (0.18.0)
CFPropertyList (~> 2.2)
activesupport (~> 3.0)
colored (~> 1.2)
escape (~> 0.0.4)
GIT
remote: https://github.com/CocoaPods/Core.git
revision: 97e961955a9d230aa5d2291dc1d323d283f1d49f
branch: master
specs:
cocoapods-core (0.33.1)
activesupport (>= 3.2.15)
fuzzy_match (~> 2.0.4)
json_pure (~> 1.8)
nap (~> 0.8)
open4 (~> 1.3)
xcodeproj (~> 0.18.0)
nap (~> 0.5)
GEM
remote: http://rubygems.org/
......@@ -90,6 +90,7 @@ GEM
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
addressable (2.3.6)
ast (2.0.0)
awesome_print (1.2.0)
bacon (1.2.0)
clintegracon (0.5.2)
......@@ -113,6 +114,7 @@ GEM
github-markup (1.2.1)
posix-spawn (~> 0.3.8)
i18n (0.6.4)
json (1.8.1)
json_pure (1.8.1)
kicker (3.0.0)
listen (~> 1.3.0)
......@@ -134,7 +136,11 @@ GEM
netrc (0.7.7)
notify (0.5.2)
open4 (1.3.4)
parser (2.2.0.pre.4)
ast (>= 1.1, < 3.0)
slop (~> 3.4, >= 3.4.5)
posix-spawn (0.3.8)
powerpack (0.0.9)
prettybacon (0.0.2)
bacon (~> 1.2)
pry (0.10.0)
......@@ -144,6 +150,7 @@ GEM
pygments.rb (0.6.0)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rainbow (2.0.0)
rake (10.1.1)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
......@@ -154,6 +161,13 @@ GEM
rest-client (1.7.2)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rubocop (0.24.1)
json (>= 1.7.7, < 2)
parser (>= 2.2.0.pre.3, < 3.0)
powerpack (~> 0.0.6)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
ruby-progressbar (1.5.1)
safe_yaml (1.0.3)
simplecov (0.9.0)
docile (~> 1.1.0)
......@@ -200,6 +214,7 @@ DEPENDENCIES
rake (~> 10.1.0)
rb-fsevent
redcarpet (< 3.0.0)
rubocop
ruby-prof!
simplecov
webmock (< 1.16)
......
......@@ -140,6 +140,9 @@ begin
title 'Running examples'
Rake::Task['examples:build'].invoke
title 'Running RuboCop'
Rake::Task['rubocop'].invoke if RUBY_VERSION >= '1.9.3'
end
desc "Rebuild all the fixture tarballs"
......@@ -251,11 +254,21 @@ begin
task :default => :spec
#-- Rubocop ----------------------------------------------------------------#
if RUBY_VERSION >= '1.9.3'
require 'rubocop/rake_task'
RuboCop::RakeTask.new
end
rescue LoadError
$stderr.puts "\033[0;31m" \
'[!] Some Rake tasks haven been disabled because the environment' \
' couldn’t be loaded. Be sure to run `rake bootstrap` first.' \
"\e[0m"
$stderr.puts e.message
$stderr.puts e.backtrace
$stderr.puts
end
# Helpers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment