forked from rollbar/rollbar-gem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
204 lines (161 loc) · 4.07 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
require: rubocop-performance
AllCops:
Exclude:
- 'vendor/**/*'
- 'gemfiles/vendor/**/*'
Style/HashSyntax:
EnforcedStyle: hash_rockets
SupportedStyles:
- hash_rockets
Style/SymbolArray:
Enabled: false # %i[] syntax isn't 1.9.x compatible
Metrics/LineLength:
Max: 1000
Metrics/MethodLength:
Max: 15 # Relax slightly from the default of 10
Style/DoubleNegation:
Enabled: false
Style/Lambda:
Enabled: false
Style/EachWithObject:
Enabled: false
Metrics/BlockLength:
ExcludedMethods: ['describe', 'context'] # RSpec DSL is expected to have long blocks.
Style/ExpandPathArguments:
Enabled: false # syntax requires Ruby >= 2.0
Gemspec/RequiredRubyVersion:
Enabled: false # rubocop compares to gemspec, yet won't allow 1.9 as minimum version
Style/Encoding:
Enabled: false # Ruby 1.9.3 needs these magic comments, e.g. # encoding: UTF-8
Style/PercentLiteralDelimiters:
PreferredDelimiters:
# rubocop switched from () to [] at some past version.
# Make sure we are consistent across all bundles/builds.
default: '[]'
Style/Documentation:
# We can enabled this if/when we want to start doing consistent class documentation.
# As is, we currently add :nodoc: if anything at all.
Enabled: false
Naming/UncommunicativeMethodParamName:
# It's possible to configure this cop to allow just about anything, but what's the point.
# The default min length of a param name is 3, but the the default whitelist includes things
# like `db` and `io`. So, short names really can be useful.
Enabled: false
Style/CaseEquality:
# The code uses `===` a lot to compare a regex to a string, but it's not clear that
# switching to `=~` is always safe, because in some cases the value could be a regex
# or a string and `str1 =~ str2` isn't valid. Whoever enables this cop should carefully
# review and test each of these.
Enabled: false
Style/FrozenStringLiteralComment:
# If we do this, it will be in its own PR. It requires adding these magic comments
# throughout the project, in order to prepare for a future Ruby 3.x.
Enabled: false
Style/SafeNavigation:
# Not available in Ruby < 2.3.
Enabled: false
#
# Performance cops are opt in, and `Enabled: true` is always required.
# Full list is here: https://github.com/rubocop-hq/rubocop-performance/tree/master/lib/rubocop/cop/performance
# For travis builds, Codacy will see and use these directives.
#
Performance/Caller:
Enabled: true
Exclude:
- spec/**/*
Performance/CaseWhenSplat:
Enabled: true
Exclude:
- spec/**/*
Performance/Casecmp:
Enabled: true
Exclude:
- spec/**/*
Performance/ChainArrayAllocation:
Enabled: true
Exclude:
- spec/**/*
Performance/CompareWithBlock:
Enabled: true
Exclude:
- spec/**/*
Performance/Count:
Enabled: true
Exclude:
- spec/**/*
Performance/Detect:
Enabled: true
Exclude:
- spec/**/*
Performance/DoubleStartEndWith:
Enabled: true
Exclude:
- spec/**/*
Performance/EndWith:
Enabled: true
Exclude:
- spec/**/*
Performance/FixedSize:
Enabled: true
Exclude:
- spec/**/*
Performance/FlatMap:
Enabled: true
Exclude:
- spec/**/*
Performance/InefficientHashSearch:
Enabled: true
Exclude:
- spec/**/*
Performance/OpenStruct:
Enabled: true
Exclude:
- spec/**/*
Performance/RangeInclude:
Enabled: true
Exclude:
- spec/**/*
Performance/RedundantBlockCall:
Enabled: true
Exclude:
- spec/**/*
Performance/RedundantMatch:
Enabled: true
Exclude:
- spec/**/*
Performance/RedundantMerge:
Enabled: true
Exclude:
- spec/**/*
Performance/RegexpMatch:
Enabled: true
Exclude:
- spec/**/*
Performance/ReverseEach:
Enabled: true
Exclude:
- spec/**/*
Performance/Size:
Enabled: true
Exclude:
- spec/**/*
Performance/StartWith:
Enabled: true
Exclude:
- spec/**/*
Performance/StringReplacement:
Enabled: true
Exclude:
- spec/**/*
Performance/TimesMap:
Enabled: true
Exclude:
- spec/**/*
Performance/UnfreezeString:
Enabled: true
Exclude:
- spec/**/*
Performance/UriDefaultParser:
Enabled: true
Exclude:
- spec/**/*