X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=.rubocop.yml;h=2dbf4503f841e32c36fb855f4c898d5db8761328;hb=refs%2Fheads%2Fpdksync_CONT-1001-update_litmus_dep;hp=a658984b32a6a64c2d4dfcc8fcf7056657b41eec;hpb=125a45c0ff330f680508f8142a7a81401e6bbf8b;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/.rubocop.yml b/.rubocop.yml index a658984..2dbf450 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,19 +1,29 @@ --- -require: rubocop-rspec +inherit_from: .rubocop_todo.yml + +require: +- rubocop-performance +- rubocop-rspec AllCops: + NewCops: enable DisplayCopNames: true - TargetRubyVersion: '2.1' + ExtraDetails: true + DisplayStyleGuide: true + TargetRubyVersion: '2.7' Include: - - "./**/*.rb" + - "**/*.rb" Exclude: - bin/* - ".vendor/**/*" - - Gemfile - - Rakefile + - "**/Gemfile" + - "**/Rakefile" - pkg/**/* - spec/fixtures/**/* - vendor/**/* -Metrics/LineLength: + - "**/Puppetfile" + - "**/Vagrantfile" + - "**/Guardfile" +Layout/LineLength: Description: People have wide screens, use them. Max: 200 RSpec/BeforeAfterAll: @@ -24,6 +34,9 @@ RSpec/BeforeAfterAll: RSpec/HookArgument: Description: Prefer explicit :each argument, matching existing module's style EnforcedStyle: each +RSpec/DescribeSymbol: + Exclude: + - spec/unit/facter/**/*.rb Style/BlockDelimiters: Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to be consistent then. @@ -56,50 +69,22 @@ Style/TrailingCommaInArguments: Description: Prefer always trailing comma on multiline argument lists. This makes diffs, and re-ordering nicer. EnforcedStyleForMultiline: comma -Style/TrailingCommaInLiteral: +Style/TrailingCommaInArrayLiteral: Description: Prefer always trailing comma on multiline literals. This makes diffs, and re-ordering nicer. EnforcedStyleForMultiline: comma Style/SymbolArray: Description: Using percent style obscures symbolic intent of array's contents. EnforcedStyle: brackets -Style/CollectionMethods: - Enabled: true -Style/MethodCalledOnDoEndBlock: - Enabled: true -Style/StringMethods: - Enabled: true -Layout/EndOfLine: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/BlockLength: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/ParameterLists: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -RSpec/DescribeClass: - Enabled: false -RSpec/ExampleLength: - Enabled: false -RSpec/MessageExpectation: - Enabled: false +RSpec/MessageSpies: + EnforcedStyle: receive +Style/Documentation: + Exclude: + - lib/puppet/parser/functions/**/* + - spec/**/* +Style/WordArray: + EnforcedStyle: brackets RSpec/MultipleExpectations: - Enabled: false -RSpec/NestedGroups: - Enabled: false -Style/AsciiComments: - Enabled: false -Style/IfUnlessModifier: - Enabled: false -Style/SymbolProc: - Enabled: false + Max: 3 +Naming/MethodParameterName: + AllowedNames: 'is'