# This is the default configuration file. Enabling and disabling is configured # in separate files. This file adds all other parameters apart from Enabled. inherit_from: - enabled.yml - disabled.yml # Common configuration. AllCops: # Include gemspec and Rakefile Includes: - '**/*.gemspec' - '**/Rakefile' Excludes: [] # By default, the rails cops are not run. Override in project or home # directory .rubocop.yml files, or by giving the -R/--rails option. RunRailsCops: false # Align the elements of a hash literal if they span more than one line. AlignHash: # Alignment of entries using hash rocket as separator. Valid values are: # # key - left alignment of keys # 'a' => 2 # 'bb' => 3 # separator - alignment of hash rockets, keys are right aligned # 'a' => 2 # 'bb' => 3 # table - left alignment of keys, hash rockets, and values # 'a' => 2 # 'bb' => 3 EnforcedHashRocketStyle: key # Alignment of entries using colon as separator. Valid values are: # # key - left alignment of keys # a: 0 # bb: 1 # separator - alignment of colons, keys are right aligned # a: 0 # bb: 1 # table - left alignment of keys and values # a: 0 # bb: 1 EnforcedColonStyle: key # Allow safe assignment in conditions. AssignmentInCondition: AllowSafeAssignment: true BlockNesting: Max: 3 ClassLength: CountComments: false # count full line comments? Max: 100 # Align with the style guide. CollectionMethods: PreferredMethods: collect: 'map' collect!: 'map!' inject: 'reduce' detect: 'find' find_all: 'select' # Checks formatting of special comments CommentAnnotation: Keywords: - TODO - FIXME - OPTIMIZE - HACK - REVIEW # Multi-line method chaining should be done with leading dots. DotPosition: Style: 'leading' # Use empty lines between defs. EmptyLineBetweenDefs: # If true, this parameter means that single line method definitions don't # need an empty line between them. AllowAdjacentOneLineDefs: false # Built-in global variables are allowed by default. GlobalVars: AllowedVariables: [] HashSyntax: # Valid values are: ruby19, hash_rockets EnforcedStyle: ruby19 LambdaCall: # Valid values are: call, braces EnforcedStyle: call LineLength: Max: 79 MethodLength: CountComments: false # count full line comments? Max: 10 MethodName: # Valid values are: snake_case, camelCase EnforcedStyle: snake_case NumericLiterals: MinDigits: 5 ParameterLists: Max: 5 CountKeywordArgs: true # Allow safe assignment in conditions. ParenthesesAroundCondition: AllowSafeAssignment: true RaiseArgs: # Valid values are: compact and exploded # exploded: raise Exception, msg # compact: raise Exception.new(msg) EnforcedStyle: exploded RedundantReturn: # When true allows code like `return x, y`. AllowMultipleReturnValues: false RegexpLiteral: MaxSlashes: 1 Semicolon: # Allow ; to separate several expressions on the same line. AllowAsExpressionSeparator: false SignalException: # Valid values are: semantic, only_raise and only_fail EnforcedStyle: semantic SingleLineMethods: AllowIfMethodIsEmpty: true StringLiterals: # Valid values (denoting the preferred quote delimiters) are: # single_quotes, double_quotes EnforcedStyle: single_quotes SpaceAroundBlockBraces: # Valid values are: space_inside_braces, no_space_inside_braces EnforcedStyle: space_inside_braces # Space between { and |. Overrides EnforcedStyle if there is a conflict. SpaceBeforeBlockParameters: true SpaceInsideHashLiteralBraces: EnforcedStyleIsWithSpaces: true SymbolName: AllowCamelCase: true # TrivialAccessors doesn't require exact name matches and doesn't allow # predicated methods by default. TrivialAccessors: ExactNameMatch: false AllowPredicates: false Whitelist: - to_ary - to_a - to_c - to_enum - to_h - to_hash - to_i - to_int - to_io - to_open - to_path - to_proc - to_r - to_regexp - to_str - to_s - to_sym VariableName: # Valid values are: snake_case, camelCase EnforcedStyle: snake_case BracesAroundHashParameters: # Valid values are: braces, no_braces EnforcedStyle: no_braces