paper-trail-gem--paper_trail/.rubocop.yml

75 lines
2.1 KiB
YAML
Raw Normal View History

inherit_from: .rubocop_todo.yml
2016-02-15 23:13:45 +00:00
# Please:
#
# - Comment any deviations from the Ruby Style Guide
# - Alphabetize cops
# - Only include permanent config; temporary goes in .rubocop_todo.yml
# We do not control `schema.rb`. Exclude it from all cops.
2015-11-02 02:33:16 +00:00
AllCops:
Exclude:
2016-02-15 23:13:45 +00:00
- test/dummy/db/schema.rb
Metrics/ClassLength:
Exclude:
- test/**/*
2016-02-15 23:13:45 +00:00
# The Ruby Style Guide recommends to "Limit lines to 80 characters."
# (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
# but 100 is also reasonable.
Metrics/LineLength:
Max: 100
# Migrations often contain long up/down methods, and extracting smaller methods
# from these is of questionable value.
Metrics/MethodLength:
Exclude:
- 'test/dummy/db/migrate/*'
2015-11-28 04:37:29 +00:00
Style/AlignParameters:
EnforcedStyle: with_fixed_indentation
2016-01-18 19:27:07 +00:00
# Please use semantic style, e.g. `do` when there's a side-effect, else `{}`.
# The semantic style is too nuanced to lint, so the cop is disabled.
Style/BlockDelimiters:
Enabled: false
2015-11-28 04:37:29 +00:00
Style/DotPosition:
EnforcedStyle: trailing
2016-02-22 04:06:16 +00:00
# Use double negation wherever it would otherwise be impractical to convert
# a value to an actual boolean.
Style/DoubleNegation:
Enabled: false
# The decision of when to use a guard clause to improve readability is subtle,
# and it's not clear that it can be linted. Certainly, the default
# `MinBodyLength` of 1 can actually hurt readability.
Style/GuardClause:
MinBodyLength: 3
2015-11-28 04:37:29 +00:00
# The Ruby Style Guide says:
#
# > Use \ instead of + or << to concatenate two string literals at line end.
#
# but in my experience the `\` style is rarely used and less readable. Please
# concatenate multiline strings with `+` or use a HEREDOC.
Style/LineEndConcatenation:
Enabled: false
2016-03-05 22:30:53 +00:00
Style/MultilineMethodCallIndentation:
EnforcedStyle: indented
Style/MultilineOperationIndentation:
EnforcedStyle: indented
2016-03-05 22:21:36 +00:00
Style/PredicateName:
NameWhitelist: has_paper_trail
# The Ruby Style Guide does not prescribe a particular quote character, only
# that a project should pick one and be consistent. The decision has no
# performance implications. Double quotes are slightly easier to read.
Style/StringLiterals:
EnforcedStyle: double_quotes