Merge pull request #731 from willmeek/rubocopification
[puppet-modules/puppetlabs-apt.git] / .rubocop.yml
1 ---
2 require:
3  - rubocop-rspec
4 AllCops:
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 inherit_from: .rubocop_todo.yml
17 Metrics/LineLength:
18   Description: People have wide screens, use them.
19   Max: 200
20 RSpec/BeforeAfterAll:
21   Description: Beware of using after(:all) as it may cause state to leak between tests.
22     A necessary evil in acceptance testing.
23   Exclude:
24   - spec/acceptance/**/*.rb
25 RSpec/HookArgument:
26   Description: Prefer explicit :each argument, matching existing module's style
27   EnforcedStyle: each
28 Style/BlockDelimiters:
29   Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
30     be consistent then.
31   EnforcedStyle: braces_for_chaining
32 Style/ClassAndModuleChildren:
33   Description: Compact style reduces the required amount of indentation.
34   EnforcedStyle: compact
35 Style/EmptyElse:
36   Description: Enforce against empty else clauses, but allow `nil` for clarity.
37   EnforcedStyle: empty
38 Style/FormatString:
39   Description: Following the main puppet project's style, prefer the % format format.
40   EnforcedStyle: percent
41 Style/FormatStringToken:
42   Description: Following the main puppet project's style, prefer the simpler template
43     tokens over annotated ones.
44   EnforcedStyle: template
45 Style/Lambda:
46   Description: Prefer the keyword for easier discoverability.
47   EnforcedStyle: literal
48 Style/RegexpLiteral:
49   Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
50   EnforcedStyle: percent_r
51 Style/TernaryParentheses:
52   Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
53     on complex expressions for better readability, but seriously consider breaking
54     it up.
55   EnforcedStyle: require_parentheses_when_complex
56 Style/TrailingCommaInArguments:
57   Description: Prefer always trailing comma on multiline argument lists. This makes
58     diffs, and re-ordering nicer.
59   EnforcedStyleForMultiline: comma
60 Style/TrailingCommaInLiteral:
61   Description: Prefer always trailing comma on multiline literals. This makes diffs,
62     and re-ordering nicer.
63   EnforcedStyleForMultiline: comma
64 Style/SymbolArray:
65   Description: Using percent style obscures symbolic intent of array's contents.
66   EnforcedStyle: brackets
67 Style/CollectionMethods:
68   Enabled: true
69 Style/MethodCalledOnDoEndBlock:
70   Enabled: true
71 Style/StringMethods:
72   Enabled: true
73 Metrics/AbcSize:
74   Enabled: false
75 Metrics/BlockLength:
76   Enabled: false
77 Metrics/ClassLength:
78   Enabled: false
79 Metrics/CyclomaticComplexity:
80   Enabled: false
81 Metrics/MethodLength:
82   Enabled: false
83 Metrics/ModuleLength:
84   Enabled: false
85 Metrics/ParameterLists:
86   Enabled: false
87 Metrics/PerceivedComplexity:
88   Enabled: false
89 RSpec/DescribeClass:
90   Enabled: false
91 RSpec/MessageExpectation:
92   Enabled: false
93 Style/AsciiComments:
94   Enabled: false
95 Style/IfUnlessModifier:
96   Enabled: false
97 Style/SymbolProc:
98   Enabled: false