-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
.rubocop.yml
310 lines (272 loc) · 12.8 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
inherit_from: .rubocop_todo.yml
require:
- rubocop-rails
- rubocop-rspec
AllCops:
DisplayCopNames: true
NewCops: enable
Layout/SpaceAroundMethodCallOperator:
Enabled: false
Lint/RaiseException:
Enabled: false
Lint/StructNewOverride:
Enabled: false
Style/ExponentialNotation:
Enabled: false
Style/HashEachMethods:
Enabled: false
Style/HashTransformKeys:
Enabled: false
Style/HashTransformValues:
Enabled: false
Layout/BlockAlignment:
Exclude:
- 'db/migrate/20130705092519_create_rails_admin_histories_table.rb'
Layout/DefEndAlignment:
Enabled: true
Exclude:
- 'db/migrate/20130705092519_create_rails_admin_histories_table.rb'
- 'db/migrate/20150919060031_add_extra_fields_to_measurements_table.rb'
Metrics/AbcSize:
Exclude:
- 'db/migrate/20111214162214_create_bgeigie_logs.rb'
- 'db/migrate/20120323105044_create_drive_logs.rb'
# ignore spec files because examples are in block and tend to be long
Metrics/BlockLength:
Exclude:
- 'config/environments/*.rb'
- 'spec/**/*.rb'
Layout/LineLength:
Max: 160
AllowHeredoc: true
AllowURI: true
URISchemes:
- http
- https
Metrics/MethodLength:
Exclude:
- 'db/migrate/20111214154833_create_delayed_jobs.rb'
- 'db/migrate/20111214162214_create_bgeigie_logs.rb'
- 'db/migrate/20120323105044_create_drive_logs.rb'
- 'db/migrate/20120418231658_devise_create_admins.rb'
Layout/AccessModifierIndentation:
EnforcedStyle: indent
# `alias` is lexically scoped, and `alias_method` is dynamically scoped;
# depends on `self` at runtime.
Style/Alias:
EnforcedStyle: prefer_alias_method
# It would be nice to have class/module documenttation, but not
# necessary.
Style/Documentation:
Enabled: false
Layout/EmptyLines:
Exclude:
- 'db/migrate/20111123174941_devise_create_users.rb'
Layout/EmptyLinesAroundClassBody:
Exclude:
- 'db/migrate/20111123174941_devise_create_users.rb'
- 'db/migrate/20130114094100_change_height_on_measurement_import_from_integer_to_decimal.rb'
Layout/EmptyLinesAroundMethodBody:
Exclude:
- 'db/migrate/20120306150302_add_fields_to_measurements.rb'
- 'db/migrate/20120306202021_add_time_zone_to_user.rb'
- 'db/migrate/20120307130255_add_status_details_to_measurement_import.rb'
- 'db/migrate/20120307130803_add_approved_to_measurement_import.rb'
- 'db/migrate/20120315211955_add_name_and_description_to_measurement_import.rb'
- 'db/migrate/20120315220809_add_lines_count_to_measurement_import.rb'
- 'db/migrate/20120417190549_add_details_to_measurement_import.rb'
- 'db/migrate/20130606042505_add_devise_confirmable_to_user.rb'
- 'db/migrate/20150919060031_add_extra_fields_to_measurements_table.rb'
Style/HashSyntax:
Exclude:
- 'db/migrate/20111123174941_devise_create_users.rb'
- 'db/migrate/20111130103929_add_location_to_measurement.rb'
- 'db/migrate/20111213000431_create_maps_measurements.rb'
- 'db/migrate/20111214154833_create_delayed_jobs.rb'
- 'db/migrate/20120103213502_add_default_to_bgeigie_log.rb'
- 'db/migrate/20120110185237_add_computed_location_to_bgeigie_logs.rb'
- 'db/migrate/20120116134744_add_checksum_to_bgeigie_log_and_measurement.rb'
- 'db/migrate/20120307130803_add_approved_to_measurement_import.rb'
- 'db/migrate/20120307150105_add_moderator_to_user.rb'
- 'db/migrate/20120323105044_create_drive_logs.rb'
- 'db/migrate/20120323115733_add_location_to_drive_log.rb'
- 'db/migrate/20120324094455_add_unique_md5sum_index_to_drive_log.rb'
- 'db/migrate/20120418231658_devise_create_admins.rb'
- 'db/migrate/20120521225350_add_spatial_index_on_measurements.rb'
- 'db/migrate/20120625212801_change_drive_log_float_limit_to_24.rb'
- 'db/migrate/20130114094100_change_height_on_measurement_import_from_integer_to_decimal.rb'
- 'db/migrate/20130427160522_change_latitude_nmea_on_bgeigie_log_to_decimal.rb'
- 'db/migrate/20130606042505_add_devise_confirmable_to_user.rb'
- 'db/migrate/20130705092519_create_rails_admin_histories_table.rb'
Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
Layout/IndentationConsistency:
Exclude:
- 'db/migrate/20130705092519_create_rails_admin_histories_table.rb'
Layout/IndentationWidth:
Exclude:
- 'db/migrate/20120307175658_add_timestamps_to_measurement_imports.rb'
- 'db/migrate/20130705092519_create_rails_admin_histories_table.rb'
- 'db/migrate/20150919060031_add_extra_fields_to_measurements_table.rb'
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Layout/SpaceAroundOperators:
Exclude:
- 'db/migrate/20120521225350_add_spatial_index_on_measurements.rb'
Layout/SpaceInsideArrayLiteralBrackets:
Exclude:
- 'db/migrate/20160208190731_add_subtype_to_measurement_imports.rb'
Layout/SpaceInsideParens:
Exclude:
- 'db/migrate/20130705092519_create_rails_admin_histories_table.rb'
Style/EmptyMethod:
Exclude:
- 'db/migrate/20111128163114_add_lat_and_lng.rb'
- 'db/migrate/20130115042245_save_cities_and_credits_as_strings.rb'
- 'db/migrate/20130117111202_reset_counters.rb'
# ignore files that created by rails or bundled gems
Style/ExpandPathArguments:
Exclude:
- 'bin/bundle'
- 'bin/rails'
- 'script/rails'
Style/FrozenStringLiteralComment:
Exclude:
- 'Gemfile'
- 'Rakefile'
- 'bin/bundle'
- 'bin/rails'
- 'bin/rake'
- 'config.ru'
- 'db/migrate/20111123174941_devise_create_users.rb'
- 'db/migrate/20111123190839_add_name_to_user.rb'
- 'db/migrate/20111124211843_create_measurements.rb'
- 'db/migrate/20111128163114_add_lat_and_lng.rb'
- 'db/migrate/20111128163317_add_latitude_and_longitude_to_measurement.rb'
- 'db/migrate/20111128171949_add_unit_to_measurement.rb'
- 'db/migrate/20111130103929_add_location_to_measurement.rb'
- 'db/migrate/20111130104648_remove_latitude_and_longitude_from_measurement.rb'
- 'db/migrate/20111130132854_add_location_name_to_measurement.rb'
- 'db/migrate/20111210075847_create_maps.rb'
- 'db/migrate/20111210234133_create_devices.rb'
- 'db/migrate/20111210235123_remove_device_strings_from_maps.rb'
- 'db/migrate/20111210235206_add_user_to_maps.rb'
- 'db/migrate/20111210235226_add_device_to_maps.rb'
- 'db/migrate/20111210235259_add_device_to_measurements.rb'
- 'db/migrate/20111213000431_create_maps_measurements.rb'
- 'db/migrate/20111214134716_create_measurement_imports.rb'
- 'db/migrate/20111214154833_create_delayed_jobs.rb'
- 'db/migrate/20111214161111_add_measurements_count_to_measurement_import.rb'
- 'db/migrate/20111214162214_create_bgeigie_logs.rb'
- 'db/migrate/20111214224431_add_name_to_maps.rb'
- 'db/migrate/20111214224611_add_history_to_measurements.rb'
- 'db/migrate/20120103182931_add_bgeigie_import_id_to_bgeigie_log.rb'
- 'db/migrate/20120103213502_add_default_to_bgeigie_log.rb'
- 'db/migrate/20120110185237_add_computed_location_to_bgeigie_logs.rb'
- 'db/migrate/20120116133915_add_measurement_import_id_to_measurement.rb'
- 'db/migrate/20120116134744_add_checksum_to_bgeigie_log_and_measurement.rb'
- 'db/migrate/20120116144757_add_map_id_to_measurement_import.rb'
- 'db/migrate/20120116150229_add_captured_at_to_measurement.rb'
- 'db/migrate/20120306150302_add_fields_to_measurements.rb'
- 'db/migrate/20120306202021_add_time_zone_to_user.rb'
- 'db/migrate/20120307130255_add_status_details_to_measurement_import.rb'
- 'db/migrate/20120307130803_add_approved_to_measurement_import.rb'
- 'db/migrate/20120307150105_add_moderator_to_user.rb'
- 'db/migrate/20120307175658_add_timestamps_to_measurement_imports.rb'
- 'db/migrate/20120307232457_create_configurables.rb'
- 'db/migrate/20120315211955_add_name_and_description_to_measurement_import.rb'
- 'db/migrate/20120315220809_add_lines_count_to_measurement_import.rb'
- 'db/migrate/20120323105044_create_drive_logs.rb'
- 'db/migrate/20120323115733_add_location_to_drive_log.rb'
- 'db/migrate/20120323181147_rename_measurement_import_id_to_drive_import_id_on_drive_log.rb'
- 'db/migrate/20120324025600_add_md5sum_to_drive_log.rb'
- 'db/migrate/20120324094455_add_unique_md5sum_index_to_drive_log.rb'
- 'db/migrate/20120324100545_add_index_on_location.rb'
- 'db/migrate/20120417190549_add_details_to_measurement_import.rb'
- 'db/migrate/20120418231658_devise_create_admins.rb'
- 'db/migrate/20120521225350_add_spatial_index_on_measurements.rb'
- 'db/migrate/20120526101510_set_description_as_text_on_map.rb'
- 'db/migrate/20120614160337_change_value_to_decimal.rb'
- 'db/migrate/20120625212801_change_drive_log_float_limit_to_24.rb'
- 'db/migrate/20130114094100_change_height_on_measurement_import_from_integer_to_decimal.rb'
- 'db/migrate/20130115032717_create_measurement_import_logs.rb'
- 'db/migrate/20130115042245_save_cities_and_credits_as_strings.rb'
- 'db/migrate/20130117110750_add_counter_cache_to_device.rb'
- 'db/migrate/20130117110817_add_measurements_count_to_user.rb'
- 'db/migrate/20130117111202_reset_counters.rb'
- 'db/migrate/20130118064024_add_default_locale_to_user.rb'
- 'db/migrate/20130427160522_change_latitude_nmea_on_bgeigie_log_to_decimal.rb'
- 'db/migrate/20130429205209_index_measurements_on_captured_at.rb'
- 'db/migrate/20130429205707_index_measurements_on_value_and_unit.rb'
- 'db/migrate/20130606042505_add_devise_confirmable_to_user.rb'
- 'db/migrate/20130705092519_create_rails_admin_histories_table.rb'
- 'db/migrate/20140718095222_add_queue_to_delayed_jobs.rb'
- 'db/migrate/20150919060031_add_extra_fields_to_measurements_table.rb'
- 'db/migrate/20160208190731_add_subtype_to_measurement_imports.rb'
- 'db/migrate/20160403092926_add_comment_to_bgeigie_imports.rb'
- 'db/migrate/20160531111906_add_rejected_to_bgeigie_imports.rb'
- 'db/migrate/20160607005457_alter_measurement_imports_subtype_set_not_null.rb'
- 'db/migrate/20160614042818_add_user_id_and_created_at_index_to_measurements.rb'
- 'db/migrate/20160615215212_add_authentication_token_created_at_to_users.rb'
- 'db/migrate/20180603015430_create_uploader_contact_histories.rb'
- 'deploy/after_restart.rb'
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%i': '()'
'%w': '()'
'%W': '()'
Style/SpecialGlobalVars:
EnforcedStyle: use_english_names
Style/StringLiterals:
Exclude:
- 'db/migrate/20120418231658_devise_create_admins.rb'
- 'db/migrate/20120521225350_add_spatial_index_on_measurements.rb'
Style/SymbolArray:
Exclude:
- 'db/migrate/20111214154833_create_delayed_jobs.rb'
- 'db/migrate/20130429205707_index_measurements_on_value_and_unit.rb'
- 'db/migrate/20130705092519_create_rails_admin_histories_table.rb'
- 'db/migrate/20160208190731_add_subtype_to_measurement_imports.rb'
- 'db/migrate/20160614042818_add_user_id_and_created_at_index_to_measurements.rb'
- 'db/migrate/20180603015430_create_uploader_contact_histories.rb'
Style/SymbolProc:
Exclude:
- 'db/migrate/20120307175658_add_timestamps_to_measurement_imports.rb'
Layout/IndentationStyle:
Exclude:
- 'db/migrate/20111214154833_create_delayed_jobs.rb'
Layout/TrailingEmptyLines:
Exclude:
- 'db/migrate/20111214154833_create_delayed_jobs.rb'
- 'db/migrate/20120103213502_add_default_to_bgeigie_log.rb'
- 'db/migrate/20120307232457_create_configurables.rb'
Layout/TrailingWhitespace:
Exclude:
- 'db/migrate/20111124211843_create_measurements.rb'
- 'db/migrate/20111128163114_add_lat_and_lng.rb'
- 'db/migrate/20111210235206_add_user_to_maps.rb'
- 'db/migrate/20111210235226_add_device_to_maps.rb'
- 'db/migrate/20111210235259_add_device_to_measurements.rb'
- 'db/migrate/20111214154833_create_delayed_jobs.rb'
- 'db/migrate/20111214224611_add_history_to_measurements.rb'
- 'db/migrate/20120103213502_add_default_to_bgeigie_log.rb'
- 'db/migrate/20120103213502_add_default_to_bgeigie_log.rb'
- 'db/migrate/20120307232457_create_configurables.rb'
Naming/VariableName:
Enabled: true
# This cop checks schema in db/schema.rb, but ours is empty.
Rails/UniqueValidationWithoutIndex:
Enabled: false
Rails/ThreeStateBooleanColumn:
Exclude:
- db/migrate/20120307130803_add_approved_to_measurement_import.rb
- db/migrate/20120307150105_add_moderator_to_user.rb
- db/migrate/20160531111906_add_rejected_to_bgeigie_imports.rb
- db/migrate/20191017054450_add_would_auto_approve_to_measurement_imports.rb
- db/migrate/20191022080113_add_cpm_equals_zero_to_measurement_imports.rb
- db/migrate/20191025034816_add_auto_approve_rules_to_measruement_imports.rb
- db/migrate/20191025034816_add_auto_approve_rules_to_measruement_imports.rb
- db/migrate/20191025034816_add_auto_approve_rules_to_measruement_imports.rb
- db/migrate/20191025034816_add_auto_approve_rules_to_measruement_imports.rb