-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.rubocop.yml
164 lines (126 loc) · 3.11 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
AllCops:
Exclude:
- 'bin/*'
- 'gemfiles/**/*'
- 'tmp/**/*'
- 'vendor/**/*'
Layout/LineLength:
Max: 120
Exclude:
- "spec/**/*"
Lint/AssignmentInCondition:
Enabled: false
Lint/SuppressedException:
Exclude:
- "spec/integration/**/*"
Metrics/AbcSize:
Max: 29
Metrics/BlockLength:
Max: 32
ExcludedMethods:
- describe
Metrics/ClassLength:
Max: 198
Metrics/CyclomaticComplexity:
Max: 11
Metrics/MethodLength:
Max: 34
Metrics/PerceivedComplexity:
Max: 9
Naming/FileName:
Exclude:
- lib/resqued/quit-and-wait.rb
Style/AndOr:
EnforcedStyle: conditionals
Style/BlockDelimiters:
EnforcedStyle: semantic
IgnoredMethods:
- before
- each
- it
- kill_safely
- let
- new
- watch
FunctionalMethods:
- trap
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
# TODO - add docs to these:
- 'lib/resqued.rb'
- 'lib/resqued/backoff.rb'
- 'lib/resqued/config.rb'
- 'lib/resqued/daemon.rb'
- 'lib/resqued/listener_pool.rb'
- 'lib/resqued/listener_state.rb'
- 'lib/resqued/logging.rb'
- 'lib/resqued/procline_version.rb'
- 'lib/resqued/quit-and-wait.rb'
- 'lib/resqued/replace_master.rb'
- 'lib/resqued/runtime_info.rb'
- 'lib/resqued/sleepy.rb'
- 'lib/resqued/test_case.rb'
Style/EmptyMethod:
EnforcedStyle: expanded
Style/FormatString:
EnforcedStyle: sprintf
# maybe eventually, if positional tokens become difficult to maintain.
Style/FormatStringToken:
Enabled: false
# TODO - figure out if frozen string literals will be ok.
Style/FrozenStringLiteralComment:
Enabled: false
Style/GlobalVars:
Exclude:
# Config specs need to pass data back and forth, and globals are the way to do it.
# TODO - look into using a fixed name, to help avoid accidentally mistyping the var name.
- 'spec/resqued/config_spec.rb'
- 'spec/resqued/config/*'
Style/GuardClause:
MinBodyLength: 4
Style/HashSyntax:
Exclude:
- 'Rakefile'
Style/IfUnlessModifier:
Enabled: false
Style/NumericLiteralPrefix:
EnforcedOctalStyle: zero_only
Style/NumericPredicate:
EnforcedStyle: comparison
Style/ParallelAssignment:
Enabled: false
Style/PerlBackrefs:
Enabled: false
Style/RedundantBegin:
# Ruby 3.0 changed some block syntax and 'begin' is sometimes optional now.
# Leave this disabled until Resqued only supports Rubies where there's one
# way to do it.
Enabled: false
Style/RedundantReturn:
Enabled: false
Style/RescueModifier:
# TODO - enable this check and restructure the affected code.
Enabled: false
Style/RescueStandardError:
# TODO - enable this check and rescue the right types of things.
Enabled: false
Style/Semicolon:
AllowAsExpressionSeparator: true
Style/SpecialGlobalVars:
EnforcedStyle: use_perl_names
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/SymbolArray:
EnforcedStyle: brackets
Style/SymbolProc:
Enabled: false
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma
Style/WordArray:
Enabled: false
Style/YodaCondition:
Enabled: false