-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.rubocop.yml
75 lines (67 loc) · 1.73 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
require:
- rubocop-performance
- 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:
- bin/*
# 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
Lint/RescueException:
Enabled: false # we need to rescue Java exceptions quite a bit
Metrics:
Enabled: false
Performance/Casecmp:
AutoCorrect: false
RSpec/DescribeClass:
Enabled: false
RSpec/ExampleLength:
Enabled: false
RSpec/FilePath:
CustomTransform:
OpenHAB: openhab
RSpec/MessageSpies:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
Style/Alias:
EnforcedStyle: prefer_alias_method
Style/CaseEquality:
Exclude: # we're explicitly testing this operator
- spec/openhab/dsl/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
- $ir
- $rules
- $se
- $scriptExtension
- $things
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
Style/PercentQLiterals:
EnforcedStyle: upper_case_q
Style/PerlBackrefs:
Enabled: false
Style/RescueStandardError:
EnforcedStyle: implicit
Style/SpecialGlobalVars:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/TernaryParentheses:
EnforcedStyle: require_parentheses_when_complex