(CONT-1001) Add litmus ~> 1.0
[puppet-modules/puppetlabs-apt.git] / .rubocop.yml
1 ---
2 inherit_from: .rubocop_todo.yml
3
4 require:
5 - rubocop-performance
6 - rubocop-rspec
7 AllCops:
8   NewCops: enable
9   DisplayCopNames: true
10   ExtraDetails: true
11   DisplayStyleGuide: true
12   TargetRubyVersion: '2.7'
13   Include:
14   - "**/*.rb"
15   Exclude:
16   - bin/*
17   - ".vendor/**/*"
18   - "**/Gemfile"
19   - "**/Rakefile"
20   - pkg/**/*
21   - spec/fixtures/**/*
22   - vendor/**/*
23   - "**/Puppetfile"
24   - "**/Vagrantfile"
25   - "**/Guardfile"
26 Layout/LineLength:
27   Description: People have wide screens, use them.
28   Max: 200
29 RSpec/BeforeAfterAll:
30   Description: Beware of using after(:all) as it may cause state to leak between tests.
31     A necessary evil in acceptance testing.
32   Exclude:
33   - spec/acceptance/**/*.rb
34 RSpec/HookArgument:
35   Description: Prefer explicit :each argument, matching existing module's style
36   EnforcedStyle: each
37 RSpec/DescribeSymbol:
38   Exclude:
39   - spec/unit/facter/**/*.rb
40 Style/BlockDelimiters:
41   Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
42     be consistent then.
43   EnforcedStyle: braces_for_chaining
44 Style/ClassAndModuleChildren:
45   Description: Compact style reduces the required amount of indentation.
46   EnforcedStyle: compact
47 Style/EmptyElse:
48   Description: Enforce against empty else clauses, but allow `nil` for clarity.
49   EnforcedStyle: empty
50 Style/FormatString:
51   Description: Following the main puppet project's style, prefer the % format format.
52   EnforcedStyle: percent
53 Style/FormatStringToken:
54   Description: Following the main puppet project's style, prefer the simpler template
55     tokens over annotated ones.
56   EnforcedStyle: template
57 Style/Lambda:
58   Description: Prefer the keyword for easier discoverability.
59   EnforcedStyle: literal
60 Style/RegexpLiteral:
61   Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
62   EnforcedStyle: percent_r
63 Style/TernaryParentheses:
64   Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
65     on complex expressions for better readability, but seriously consider breaking
66     it up.
67   EnforcedStyle: require_parentheses_when_complex
68 Style/TrailingCommaInArguments:
69   Description: Prefer always trailing comma on multiline argument lists. This makes
70     diffs, and re-ordering nicer.
71   EnforcedStyleForMultiline: comma
72 Style/TrailingCommaInArrayLiteral:
73   Description: Prefer always trailing comma on multiline literals. This makes diffs,
74     and re-ordering nicer.
75   EnforcedStyleForMultiline: comma
76 Style/SymbolArray:
77   Description: Using percent style obscures symbolic intent of array's contents.
78   EnforcedStyle: brackets
79 RSpec/MessageSpies:
80   EnforcedStyle: receive
81 Style/Documentation:
82   Exclude:
83   - lib/puppet/parser/functions/**/*
84   - spec/**/*
85 Style/WordArray:
86   EnforcedStyle: brackets
87 RSpec/MultipleExpectations:
88   Max: 3
89 Naming/MethodParameterName:
90   AllowedNames: 'is'