-
Notifications
You must be signed in to change notification settings - Fork 44
/
.rubocop.yml
105 lines (83 loc) · 2.58 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
# use the shared Yast defaults
inherit_from:
/usr/share/YaST2/data/devtools/data/rubocop-1.24.1_yast_style.yml
Metrics/AbcSize:
Max: 446
Metrics/BlockNesting:
Max: 5
Metrics/ClassLength:
Max: 2711
Metrics/ModuleLength:
Max: 270
Metrics/CyclomaticComplexity:
Max: 59
Layout/LineLength:
Max: 274
Metrics/MethodLength:
Max: 980
Metrics/ParameterLists:
Max: 11
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Max: 877
Exclude:
- "library/*/test/**/*_test.rb"
Metrics/PerceivedComplexity:
Max: 70
# this needs more testing if we can have frozen string literals
Style/FrozenStringLiteralComment:
Enabled: false
Naming/AccessorMethodName:
# keep backward compatibility, but do not allow new code to be non-ruby style
Exclude:
- library/systemd/src/modules/systemd_target.rb
Naming/ClassAndModuleCamelCase:
# UI_ID module is not camel case
Exclude:
- "library/packages/src/modules/SlideShow.rb"
Style/ClassVars:
# We really need the class variables in SuSEFirewall modules
Exclude:
- "library/network/src/modules/SuSEFirewall.rb"
# ensure new code is properly documented
Style/Documentation:
Include:
- "library/*/src/lib/**/*.rb"
Naming/FileName:
Include:
- "library/*/src/lib/**/*.rb"
Naming/MethodName:
Include:
- "library/*/src/lib/**/*.rb"
Exclude:
- "library/network/src/lib/network/susefirewall.rb"
- "library/network/src/lib/network/susefirewallservices.rb"
- "library/network/src/lib/network/susefirewalld.rb"
- "library/network/src/lib/network/susefirewalldservices.rb"
- "library/network/src/lib/network/susefirewall2.rb"
- "library/network/src/lib/network/susefirewall2services.rb"
Style/Next:
# skip this check for SuSEFirewall modules since it forces us to
# refactor the code in a sub-optimal way.
Exclude:
- "library/network/src/lib/network/susefirewalld.rb"
# keep it as it is part of API for old code
Naming/PredicateName:
Include:
- "library/*/src/lib/**/*.rb"
# for old code keep it as often methods names are wrong and part of API
Style/TrivialAccessors:
Include:
- "library/*/src/lib/**/*.rb"
Naming/VariableName:
Include:
- "library/*/src/lib/**/*.rb"
Exclude:
- "library/network/src/lib/network/susefirewall.rb"
- "library/network/src/lib/network/susefirewalld.rb"
- "library/network/src/lib/network/susefirewall2.rb"
- "library/network/src/lib/network/susefirewall2services.rb"
# this module provides API for others, so do not change existing API
Style/OptionalBooleanParameter:
Enabled: false