-
Notifications
You must be signed in to change notification settings - Fork 498
/
.rubocop.yml
112 lines (87 loc) · 2.53 KB
/
.rubocop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
inherit_from: .rubocop_todo.yml
AllCops:
TargetRubyVersion: 2.5
Exclude:
- acceptance/**/*
- vendor/**/*
require:
- rubocop-performance
- rubocop-rspec
Layout/LineLength:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Naming/ClassAndModuleCamelCase:
Exclude:
- 'spec/mocks/win32.rb'
Naming/MethodName:
Exclude:
- 'spec/mocks/win32ole.rb'
- 'spec/mocks/ffi.rb'
Naming/PredicateName:
Exclude:
- 'spec/**/*'
Naming/VariableNumber:
Exclude:
- 'lib/facter/resolvers/windows/ffi/networking_ffi.rb'
- 'lib/facter/util/facts/windows_release_finder.rb'
RSpec/DescribedClass:
EnforcedStyle: explicit
RSpec/ExampleLength:
Enabled: false
# It is sometimes better to expect().to receive().and_return
# or to receive different messages.
RSpec/MessageSpies:
Enabled: false
RSpec/MultipleExpectations:
Max: 3
RSpec/MultipleMemoizedHelpers:
Enabled: false
RSpec/NestedGroups:
Enabled: 6
RSpec/StubbedMock:
Enabled: false
RSpec/SubjectStub:
Exclude:
- 'spec/custom_facts/core/aggregate_spec.rb'
- 'spec/custom_facts/core/resolvable_spec.rb'
- 'spec/custom_facts/util/fact_spec.rb'
- 'spec/custom_facts/util/resolution_spec.rb'
# Prefer instance_double/instance_spy over double/spy because only methods
# defined on the underlying object can be stubbed. FFI and some Windows
# code can't be verified because of the way we fake out those classes.
RSpec/VerifiedDoubles:
Enabled: true
Exclude:
- 'spec/custom_facts/**/*'
- 'spec/facter/resolvers/aix/hardware_spec.rb'
- 'spec/facter/resolvers/*/ffi_helper_spec.rb'
- 'spec/facter/resolvers/windows/*'
- 'spec/facter/util/windows/network_utils_spec.rb'
- 'spec/facter/util/windows/win32ole_spec.rb'
# $stdout is preferred because it refers to the *current* stdout stream, while
# STDOUT refers to the original stream. However, we can't just switch to using
# $stdout, because it may have been assigned to a different object than STDOUT,
# such as a IO to a file.
Style/GlobalStdStream:
Exclude:
- 'lib/facter.rb'
- 'lib/facter/framework/cli/cli_launcher.rb'
- 'lib/facter/framework/logging/logger.rb'
- 'spec/framework/core/fact/internal/internal_fact_manager_spec.rb'
- 'spec/framework/logging/logger_spec.rb'
Style/IfUnlessModifier:
Enabled: false