(MODULES-7658) use beaker4 in puppet-module-gems
[puppet-modules/puppetlabs-apt.git] / .rubocop.yml
1 ---
2 require: rubocop-rspec
3 AllCops:
4   DisplayCopNames: true
5   TargetRubyVersion: '2.1'
6   Include:
7   - "./**/*.rb"
8   Exclude:
9   - bin/*
10   - ".vendor/**/*"
11   - "**/Gemfile"
12   - "**/Rakefile"
13   - pkg/**/*
14   - spec/fixtures/**/*
15   - vendor/**/*
16   - "**/Puppetfile"
17   - "**/Vagrantfile"
18   - "**/Guardfile"
19 Metrics/LineLength:
20   Description: People have wide screens, use them.
21   Max: 200
22 RSpec/BeforeAfterAll:
23   Description: Beware of using after(:all) as it may cause state to leak between tests.
24     A necessary evil in acceptance testing.
25   Exclude:
26   - spec/acceptance/**/*.rb
27 RSpec/HookArgument:
28   Description: Prefer explicit :each argument, matching existing module's style
29   EnforcedStyle: each
30 Style/BlockDelimiters:
31   Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
32     be consistent then.
33   EnforcedStyle: braces_for_chaining
34 Style/ClassAndModuleChildren:
35   Description: Compact style reduces the required amount of indentation.
36   EnforcedStyle: compact
37 Style/EmptyElse:
38   Description: Enforce against empty else clauses, but allow `nil` for clarity.
39   EnforcedStyle: empty
40 Style/FormatString:
41   Description: Following the main puppet project's style, prefer the % format format.
42   EnforcedStyle: percent
43 Style/FormatStringToken:
44   Description: Following the main puppet project's style, prefer the simpler template
45     tokens over annotated ones.
46   EnforcedStyle: template
47 Style/Lambda:
48   Description: Prefer the keyword for easier discoverability.
49   EnforcedStyle: literal
50 Style/RegexpLiteral:
51   Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
52   EnforcedStyle: percent_r
53 Style/TernaryParentheses:
54   Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
55     on complex expressions for better readability, but seriously consider breaking
56     it up.
57   EnforcedStyle: require_parentheses_when_complex
58 Style/TrailingCommaInArguments:
59   Description: Prefer always trailing comma on multiline argument lists. This makes
60     diffs, and re-ordering nicer.
61   EnforcedStyleForMultiline: comma
62 Style/TrailingCommaInLiteral:
63   Description: Prefer always trailing comma on multiline literals. This makes diffs,
64     and re-ordering nicer.
65   EnforcedStyleForMultiline: comma
66 Style/SymbolArray:
67   Description: Using percent style obscures symbolic intent of array's contents.
68   EnforcedStyle: brackets
69 RSpec/MessageSpies:
70   EnforcedStyle: receive
71 Style/Documentation:
72   Exclude:
73   - lib/puppet/parser/functions/**/*
74   - spec/**/*
75 Style/WordArray:
76   EnforcedStyle: brackets
77 Style/CollectionMethods:
78   Enabled: true
79 Style/MethodCalledOnDoEndBlock:
80   Enabled: true
81 Style/StringMethods:
82   Enabled: true
83 Layout/EndOfLine:
84   Enabled: false
85 Layout/IndentHeredoc:
86   Enabled: false
87 Metrics/AbcSize:
88   Enabled: false
89 Metrics/BlockLength:
90   Enabled: false
91 Metrics/ClassLength:
92   Enabled: false
93 Metrics/CyclomaticComplexity:
94   Enabled: false
95 Metrics/MethodLength:
96   Enabled: false
97 Metrics/ModuleLength:
98   Enabled: false
99 Metrics/ParameterLists:
100   Enabled: false
101 Metrics/PerceivedComplexity:
102   Enabled: false
103 RSpec/DescribeClass:
104   Enabled: false
105 RSpec/ExampleLength:
106   Enabled: false
107 RSpec/MessageExpectation:
108   Enabled: false
109 RSpec/MultipleExpectations:
110   Enabled: false
111 RSpec/NestedGroups:
112   Enabled: false
113 Style/AsciiComments:
114   Enabled: false
115 Style/IfUnlessModifier:
116   Enabled: false
117 Style/SymbolProc:
118   Enabled: false