diff options
author | Phil Hughes <me@iamphill.com> | 2016-11-24 14:31:59 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-11-24 14:31:59 +0300 |
commit | 79a791a30d60d04be34d0e6d36c9cc145b97635b (patch) | |
tree | 7495834ed7bdfb51946c5f40fc61f1568ff0f823 /.rubocop.yml | |
parent | fa04393482eff8d7d7cdb71c3bdea2c918a49a57 (diff) | |
parent | 3e44ed3e2bf75bb14a2d8b0466b3d92afd0ea067 (diff) |
Merge branch 'master' into menu-resize-hidemenu-resize-hide
Diffstat (limited to '.rubocop.yml')
-rw-r--r-- | .rubocop.yml | 87 |
1 files changed, 19 insertions, 68 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index b054675d677..13df3f99613 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,7 +5,7 @@ require: inherit_from: .rubocop_todo.yml AllCops: - TargetRubyVersion: 2.3 + TargetRubyVersion: 2.1 # Cop names are not d§splayed in offense messages by default. Change behavior # by overriding DisplayCopNames, or by giving the -D/--display-cop-names # option. @@ -453,6 +453,10 @@ Style/VariableName: EnforcedStyle: snake_case Enabled: true +# Use the configured style when numbering variables. +Style/VariableNumber: + Enabled: false + # Use when x then ... for one-line cases. Style/WhenThen: Enabled: true @@ -639,6 +643,10 @@ Lint/RescueException: Lint/ShadowedException: Enabled: false +# Checks for Object#to_s usage in string interpolation. +Lint/StringConversionInInterpolation: + Enabled: true + # Do not use prefix `_` for a variable that is used. Lint/UnderscorePrefixedVariableName: Enabled: true @@ -767,33 +775,26 @@ Rails/ScopeArgs: RSpec/AnyInstance: Enabled: false -# Check for expectations where `be(...)` can replace `eql(...)`. -RSpec/BeEql: - Enabled: false - -# Check that the first argument to the top level describe is a constant. +# Check that the first argument to the top level describe is the tested class or +# module. RSpec/DescribeClass: Enabled: false -# Checks that tests use `described_class`. -RSpec/DescribedClass: - Enabled: false - -# Checks that the second argument to `describe` specifies a method. +# Use `described_class` for tested class / module. RSpec/DescribeMethod: Enabled: false -# Checks if an example group does not include any tests. -RSpec/EmptyExampleGroup: +# Checks that the second argument to top level describe is the tested method +# name. +RSpec/DescribedClass: Enabled: false - CustomIncludeMethods: [] -# Checks for long examples. +# Checks for long example. RSpec/ExampleLength: Enabled: false Max: 5 -# Checks that example descriptions do not start with "should". +# Do not use should when describing your tests. RSpec/ExampleWording: Enabled: false CustomTransform: @@ -802,10 +803,6 @@ RSpec/ExampleWording: not: does not IgnoredWords: [] -# Checks for `expect(...)` calls containing literal values. -RSpec/ExpectActual: - Enabled: false - # Checks the file and folder naming of the spec file. RSpec/FilePath: Enabled: false @@ -817,65 +814,19 @@ RSpec/FilePath: RSpec/Focus: Enabled: true -# Checks the arguments passed to `before`, `around`, and `after`. -RSpec/HookArgument: - Enabled: false - EnforcedStyle: implicit - -# Check that a consistent implict expectation style is used. -# TODO (rspeicher): Available in rubocop-rspec 1.8.0 -# RSpec/ImplicitExpect: -# Enabled: true -# EnforcedStyle: is_expected - # Checks for the usage of instance variables. RSpec/InstanceVariable: Enabled: false -# Checks for `subject` definitions that come after `let` definitions. -RSpec/LeadingSubject: - Enabled: false - -# Checks unreferenced `let!` calls being used for test setup. -RSpec/LetSetup: - Enabled: false - -# Check that chains of messages are not being stubbed. -RSpec/MessageChain: - Enabled: false - -# Checks for consistent message expectation style. -RSpec/MessageExpectation: - Enabled: false - EnforcedStyle: allow - -# Checks for multiple top level describes. +# Checks for multiple top-level describes. RSpec/MultipleDescribes: Enabled: false -# Checks if examples contain too many `expect` calls. -RSpec/MultipleExpectations: - Enabled: false - Max: 1 - -# Checks for explicitly referenced test subjects. -RSpec/NamedSubject: - Enabled: false - -# Checks for nested example groups. -RSpec/NestedGroups: - Enabled: false - MaxNesting: 2 - -# Checks for consistent method usage for negating expectations. +# Enforces the usage of the same method on all negative message expectations. RSpec/NotToNot: EnforcedStyle: not_to Enabled: true -# Checks for stubbed test subjects. -RSpec/SubjectStub: - Enabled: false - # Prefer using verifying doubles over normal doubles. RSpec/VerifiedDoubles: Enabled: false |