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