summaryrefslogtreecommitdiff
path: root/.rubocop.yml
diff options
context:
space:
mode:
Diffstat (limited to '.rubocop.yml')
-rw-r--r--.rubocop.yml508
1 files changed, 508 insertions, 0 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
new file mode 100644
index 0000000..5aadd1b
--- /dev/null
+++ b/.rubocop.yml
@@ -0,0 +1,508 @@
+require: rubocop-rspec
+AllCops:
+ TargetRubyVersion: 1.9
+ Include:
+ - ./**/*.rb
+ Exclude:
+ - vendor/**/*
+ - .vendor/**/*
+ - pkg/**/*
+ - spec/fixtures/**/*
+Lint/ConditionPosition:
+ Enabled: True
+
+Lint/ElseLayout:
+ Enabled: True
+
+Lint/UnreachableCode:
+ Enabled: True
+
+Lint/UselessComparison:
+ Enabled: True
+
+Lint/EnsureReturn:
+ Enabled: True
+
+Lint/HandleExceptions:
+ Enabled: True
+
+Lint/LiteralInCondition:
+ Enabled: True
+
+Lint/ShadowingOuterLocalVariable:
+ Enabled: True
+
+Lint/LiteralInInterpolation:
+ Enabled: True
+
+Style/HashSyntax:
+ Enabled: True
+
+Style/RedundantReturn:
+ Enabled: True
+
+Lint/AmbiguousOperator:
+ Enabled: True
+
+Lint/AssignmentInCondition:
+ Enabled: True
+
+Style/SpaceBeforeComment:
+ Enabled: True
+
+Style/AndOr:
+ Enabled: True
+
+Style/RedundantSelf:
+ Enabled: True
+
+# Method length is not necessarily an indicator of code quality
+Metrics/MethodLength:
+ Enabled: False
+
+# Module length is not necessarily an indicator of code quality
+Metrics/ModuleLength:
+ Enabled: False
+
+Style/WhileUntilModifier:
+ Enabled: True
+
+Lint/AmbiguousRegexpLiteral:
+ Enabled: True
+
+Lint/Eval:
+ Enabled: True
+
+Lint/BlockAlignment:
+ Enabled: True
+
+Lint/DefEndAlignment:
+ Enabled: True
+
+Lint/EndAlignment:
+ Enabled: True
+
+Lint/DeprecatedClassMethods:
+ Enabled: True
+
+Lint/Loop:
+ Enabled: True
+
+Lint/ParenthesesAsGroupedExpression:
+ Enabled: True
+
+Lint/RescueException:
+ Enabled: True
+
+Lint/StringConversionInInterpolation:
+ Enabled: True
+
+Lint/UnusedBlockArgument:
+ Enabled: True
+
+Lint/UnusedMethodArgument:
+ Enabled: True
+
+Lint/UselessAccessModifier:
+ Enabled: True
+
+Lint/UselessAssignment:
+ Enabled: True
+
+Lint/Void:
+ Enabled: True
+
+Style/AccessModifierIndentation:
+ Enabled: True
+
+Style/AccessorMethodName:
+ Enabled: True
+
+Style/Alias:
+ Enabled: True
+
+Style/AlignArray:
+ Enabled: True
+
+Style/AlignHash:
+ Enabled: True
+
+Style/AlignParameters:
+ Enabled: True
+
+Metrics/BlockNesting:
+ Enabled: True
+
+Style/AsciiComments:
+ Enabled: True
+
+Style/Attr:
+ Enabled: True
+
+Style/BracesAroundHashParameters:
+ Enabled: True
+
+Style/CaseEquality:
+ Enabled: True
+
+Style/CaseIndentation:
+ Enabled: True
+
+Style/CharacterLiteral:
+ Enabled: True
+
+Style/ClassAndModuleCamelCase:
+ Enabled: True
+
+Style/ClassAndModuleChildren:
+ Enabled: False
+
+Style/ClassCheck:
+ Enabled: True
+
+# Class length is not necessarily an indicator of code quality
+Metrics/ClassLength:
+ Enabled: False
+
+Style/ClassMethods:
+ Enabled: True
+
+Style/ClassVars:
+ Enabled: True
+
+Style/WhenThen:
+ Enabled: True
+
+Style/WordArray:
+ Enabled: True
+
+Style/UnneededPercentQ:
+ Enabled: True
+
+Style/Tab:
+ Enabled: True
+
+Style/SpaceBeforeSemicolon:
+ Enabled: True
+
+Style/TrailingBlankLines:
+ Enabled: True
+
+Style/SpaceInsideBlockBraces:
+ Enabled: True
+
+Style/SpaceInsideBrackets:
+ Enabled: True
+
+Style/SpaceInsideHashLiteralBraces:
+ Enabled: True
+
+Style/SpaceInsideParens:
+ Enabled: True
+
+Style/LeadingCommentSpace:
+ Enabled: True
+
+Style/SpaceBeforeFirstArg:
+ Enabled: True
+
+Style/SpaceAfterColon:
+ Enabled: True
+
+Style/SpaceAfterComma:
+ Enabled: True
+
+Style/SpaceAfterMethodName:
+ Enabled: True
+
+Style/SpaceAfterNot:
+ Enabled: True
+
+Style/SpaceAfterSemicolon:
+ Enabled: True
+
+Style/SpaceAroundEqualsInParameterDefault:
+ Enabled: True
+
+Style/SpaceAroundOperators:
+ Enabled: True
+
+Style/SpaceBeforeBlockBraces:
+ Enabled: True
+
+Style/SpaceBeforeComma:
+ Enabled: True
+
+Style/CollectionMethods:
+ Enabled: True
+
+Style/CommentIndentation:
+ Enabled: True
+
+Style/ColonMethodCall:
+ Enabled: True
+
+Style/CommentAnnotation:
+ Enabled: True
+
+# 'Complexity' is very relative
+Metrics/CyclomaticComplexity:
+ Enabled: False
+
+Style/ConstantName:
+ Enabled: True
+
+Style/Documentation:
+ Enabled: False
+
+Style/DefWithParentheses:
+ Enabled: True
+
+Style/PreferredHashMethods:
+ Enabled: True
+
+Style/DotPosition:
+ EnforcedStyle: trailing
+
+Style/DoubleNegation:
+ Enabled: True
+
+Style/EachWithObject:
+ Enabled: True
+
+Style/EmptyLineBetweenDefs:
+ Enabled: True
+
+Style/IndentArray:
+ Enabled: True
+
+Style/IndentHash:
+ Enabled: True
+
+Style/IndentationConsistency:
+ Enabled: True
+
+Style/IndentationWidth:
+ Enabled: True
+
+Style/EmptyLines:
+ Enabled: True
+
+Style/EmptyLinesAroundAccessModifier:
+ Enabled: True
+
+Style/EmptyLiteral:
+ Enabled: True
+
+# Configuration parameters: AllowURI, URISchemes.
+Metrics/LineLength:
+ Enabled: False
+
+Style/MethodCallParentheses:
+ Enabled: True
+
+Style/MethodDefParentheses:
+ Enabled: True
+
+Style/LineEndConcatenation:
+ Enabled: True
+
+Style/TrailingWhitespace:
+ Enabled: True
+
+Style/StringLiterals:
+ Enabled: True
+
+Style/TrailingCommaInArguments:
+ Enabled: True
+
+Style/TrailingCommaInLiteral:
+ Enabled: True
+
+Style/GlobalVars:
+ Enabled: True
+
+Style/GuardClause:
+ Enabled: True
+
+Style/IfUnlessModifier:
+ Enabled: True
+
+Style/MultilineIfThen:
+ Enabled: True
+
+Style/NegatedIf:
+ Enabled: True
+
+Style/NegatedWhile:
+ Enabled: True
+
+Style/Next:
+ Enabled: True
+
+Style/SingleLineBlockParams:
+ Enabled: True
+
+Style/SingleLineMethods:
+ Enabled: True
+
+Style/SpecialGlobalVars:
+ Enabled: True
+
+Style/TrivialAccessors:
+ Enabled: True
+
+Style/UnlessElse:
+ Enabled: True
+
+Style/VariableInterpolation:
+ Enabled: True
+
+Style/VariableName:
+ Enabled: True
+
+Style/WhileUntilDo:
+ Enabled: True
+
+Style/EvenOdd:
+ Enabled: True
+
+Style/FileName:
+ Enabled: True
+
+Style/For:
+ Enabled: True
+
+Style/Lambda:
+ Enabled: True
+
+Style/MethodName:
+ Enabled: True
+
+Style/MultilineTernaryOperator:
+ Enabled: True
+
+Style/NestedTernaryOperator:
+ Enabled: True
+
+Style/NilComparison:
+ Enabled: True
+
+Style/FormatString:
+ Enabled: True
+
+Style/MultilineBlockChain:
+ Enabled: True
+
+Style/Semicolon:
+ Enabled: True
+
+Style/SignalException:
+ Enabled: True
+
+Style/NonNilCheck:
+ Enabled: True
+
+Style/Not:
+ Enabled: True
+
+Style/NumericLiterals:
+ Enabled: True
+
+Style/OneLineConditional:
+ Enabled: True
+
+Style/OpMethod:
+ Enabled: True
+
+Style/ParenthesesAroundCondition:
+ Enabled: True
+
+Style/PercentLiteralDelimiters:
+ Enabled: True
+
+Style/PerlBackrefs:
+ Enabled: True
+
+Style/PredicateName:
+ Enabled: True
+
+Style/RedundantException:
+ Enabled: True
+
+Style/SelfAssignment:
+ Enabled: True
+
+Style/Proc:
+ Enabled: True
+
+Style/RaiseArgs:
+ Enabled: True
+
+Style/RedundantBegin:
+ Enabled: True
+
+Style/RescueModifier:
+ Enabled: True
+
+# based on https://github.com/voxpupuli/modulesync_config/issues/168
+Style/RegexpLiteral:
+ EnforcedStyle: percent_r
+ Enabled: True
+
+Lint/UnderscorePrefixedVariableName:
+ Enabled: True
+
+Metrics/ParameterLists:
+ Enabled: False
+
+Lint/RequireParentheses:
+ Enabled: True
+
+Style/SpaceBeforeFirstArg:
+ Enabled: True
+
+Style/ModuleFunction:
+ Enabled: True
+
+Lint/Debugger:
+ Enabled: True
+
+Style/IfWithSemicolon:
+ Enabled: True
+
+Style/Encoding:
+ Enabled: True
+
+Style/BlockDelimiters:
+ Enabled: True
+
+Style/MultilineBlockLayout:
+ Enabled: True
+
+# 'Complexity' is very relative
+Metrics/AbcSize:
+ Enabled: False
+
+# 'Complexity' is very relative
+Metrics/PerceivedComplexity:
+ Enabled: False
+
+Lint/UselessAssignment:
+ Enabled: True
+
+Style/ClosingParenthesisIndentation:
+ Enabled: False
+
+# RSpec
+
+# We don't use rspec in this way
+RSpec/DescribeClass:
+ Enabled: False
+
+# Example length is not necessarily an indicator of code quality
+RSpec/ExampleLength:
+ Enabled: False
+
+RSpec/NamedSubject:
+ Enabled: False