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