forked from openhab/openhab-jruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
99 lines (90 loc) · 2.25 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
inherit_gem:
rubocop-inst:
- rubocop.yml
- rubocop-rspec.yml
require:
- rubocop-rake
- rubocop-rspec
inherit_mode:
merge:
- Exclude # we want our Exclude to build on the excludes from the default config
AllCops:
TargetRubyVersion: 2.6
NewCops: enable
Exclude:
- .yard/**/*
- .yardoc/**/*
- bin/**/*
- cache/**/*
- tmp/**/*
# The following is excluded because it is within the shipped Gem
# the cop is searching for the gem itself, so exclude this file
Bundler/GemFilename:
Exclude:
- lib/openhab/dsl/gems.rb
FactoryBot:
Enabled: false
Layout/LineLength:
AllowedPatterns:
- "# @!method" # Some YARD tags can't be broken up onto multiple lines
- "# @overload"
- "# @example"
- "# @see"
- "data:[a-z/]+;base64," # Base64 data is long
Lint/RescueException:
Enabled: false # we need to rescue Java exceptions quite a bit
Lint/BinaryOperatorWithIdenticalOperands:
Exclude:
- spec/openhab/core/types/*_spec.rb
RSpec/DescribeClass:
Enabled: false
RSpec/ExpectActual:
Exclude:
- spec/openhab/core/types/*_spec.rb
RSpec/FilePath:
Enabled: false # superceded by RSpec/SpecFilePathSuffix and RSpec/SpecFilePathFormat
RSpec/SpecFilePathFormat:
CustomTransform:
OpenHAB: openhab
RSpec/IdenticalEqualityAssertion:
Exclude:
- spec/openhab/core/types/*_spec.rb
RSpec/IndexedLet:
Enabled: false
RSpec/MessageSpies:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/MultipleMemoizedHelpers:
Enabled: false
RSpec/NestedGroups:
Enabled: false
RSpec/NoExpectationExample:
Enabled: false
RSpec/SubjectStub:
Enabled: false
Style/CaseEquality:
Exclude: # we're explicitly testing this operator
- spec/openhab/core/types/*_spec.rb
# enforced by checking for 100% documented from `yard --stats`
# RuboCop doesn't know if a module is documented in a different file
Style/Documentation:
Enabled: false
Style/GlobalVars:
AllowedVariables: # these globals are set by OpenHAB, and we can't change their name
- $actions
- $ctx
- $dependencyListener
- $events
- $ir
- $rules
- $privateCache
- $se
- $scriptExtension
- $sharedCache
- $things
Style/SpecialGlobalVars:
Enabled: false
Style/YodaCondition:
Exclude:
- spec/openhab/core/types/*_spec.rb