osem-fcy/.rubocop.yml

139 lines
2.9 KiB
YAML
Raw Normal View History

Rails:
Enabled: true
2014-07-21 13:09:37 +02:00
inherit_from: .rubocop_todo.yml
Style/HashSyntax:
2014-07-21 14:49:05 +02:00
Enabled: true
2014-07-21 13:09:37 +02:00
EnforcedStyle: ruby19
# Things deprecated in current ruby API
Lint/DeprecatedClassMethods:
Enabled: true
# Do not compare with nil. Use .nil? instead
Style/NilComparison:
Enabled: true
2014-07-21 14:27:32 +02:00
# Use one empty line between method definitions
2014-07-21 13:09:37 +02:00
Style/EmptyLineBetweenDefs:
Enabled: true
2014-07-21 14:27:32 +02:00
# There should be only one empty line in designated place
2014-07-21 13:09:37 +02:00
Style/EmptyLines:
2014-07-21 14:27:32 +02:00
Enabled: true
# Keep a blank line before and after private.
Style/EmptyLinesAroundAccessModifier:
Enabled: true
# Use hash literal {} instead of Hash.new
Style/EmptyLiteral:
Enabled: true
# Prefer `each` over `for i`
Style/For:
Enabled: true
# Wrap your assignment in condition if you mean it, otherwise it is most likely equality check
Lint/AssignmentInCondition:
Enabled: true
# Align blocks of code properly
Lint/BlockAlignment:
Enabled: true
# Do not use literal in conditions. We have it enabled for now
Lint/LiteralInCondition:
2014-07-21 13:09:37 +02:00
Enabled: false
2014-07-21 14:27:32 +02:00
# Prefer `Kernel#loop -> break` over `begin -> while`
Lint/Loop:
Enabled: true
# do not put space before arguments when they are in parentheses
Lint/ParenthesesAsGroupedExpression:
Enabled: true
2014-07-21 14:37:26 +02:00
# Do not rescue Exceptions class itself
2014-07-21 14:27:32 +02:00
Lint/RescueException:
Enabled: true
2014-07-21 14:37:26 +02:00
# do not shadow local variables in blocks, choose other name
2014-07-21 14:27:32 +02:00
Lint/ShadowingOuterLocalVariable:
2014-07-21 14:37:26 +02:00
Enabled: true
2014-07-21 13:09:37 +02:00
2014-07-21 14:37:26 +02:00
# use _ or variable_name to explicitly mark variable as unused
2014-07-21 14:27:32 +02:00
Lint/UnusedBlockArgument:
2014-07-21 14:37:26 +02:00
Enabled: true
2014-07-21 13:09:37 +02:00
2014-07-21 14:37:26 +02:00
# use _ or _argument_name to explicitly mark argument as unused
2014-07-21 14:27:32 +02:00
Lint/UnusedMethodArgument:
2014-07-21 14:37:26 +02:00
Enabled: true
2014-07-21 14:27:32 +02:00
2014-07-21 14:37:26 +02:00
# avoid useless assignment
2014-07-21 14:27:32 +02:00
Lint/UselessAssignment:
2014-07-21 14:37:26 +02:00
Enabled: true
2014-07-21 13:09:37 +02:00
2014-07-21 14:49:05 +02:00
# Do not use variables in void context
2014-07-21 14:27:32 +02:00
Lint/Void:
2014-07-21 14:45:17 +02:00
Enabled: true
2014-07-21 14:27:32 +02:00
2014-07-30 23:29:52 +02:00
# Align the elements of a hash literal if they span more than one line
Style/AlignHash:
Enabled: true
# Align the parameters of a method call if they span more than one line
Style/AlignParameters:
Enabled: true
2014-07-30 23:34:09 +02:00
# Use && instead of and, use || instead of or
Style/AndOr:
Enabled: true
# avoid deep blocks nesting
Metrics/BlockNesting:
Max: 4
2016-02-18 14:40:24 +01:00
Metrics/ClassLength:
Max: 300
Exclude:
- 'app/models/conference.rb'
2016-02-18 14:40:24 +01:00
# avoid redundunt curly braces when it is obvious that hash is used
Style/BracesAroundHashParameters:
Enabled: true
# Checks that operators have space around them, except for ** which should not have surrounding space.
Style/SpaceAroundOperators:
Enabled: true
2014-07-30 23:43:00 +02:00
Style/CaseEquality:
Enabled: true
2014-08-18 21:26:45 +03:00
Style/ClassAndModuleChildren:
Enabled: true
Style/StringLiterals:
Enabled: true
2014-08-18 21:26:45 +03:00
Style/TrailingBlankLines:
Enabled: true
Style/TrailingWhitespace:
Enabled: true
# Checks for uses of double negation (!!) to convert something to a boolean value.
Style/DoubleNegation:
Enabled: true
2014-07-21 13:09:37 +02:00
AllCops:
Include:
2014-07-21 15:23:10 +02:00
- '**/Rakefile'
- '**/config.ru'
2014-07-21 13:09:37 +02:00
Exclude:
- 'db/schema.rb'
- 'vendor/bundle/**/*'
2014-08-18 21:26:45 +03:00
- 'bundle/**/*'
- 'config/**/*'
- 'bin/*'