This repository has been archived by the owner on Dec 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml.old
174 lines (144 loc) · 3.88 KB
/
.rubocop.yml.old
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
require: rubocop-thread_safety
AllCops:
TargetRubyVersion: 2.4
Exclude:
- 'Capfile'
- 'db/schema.rb'
- 'db/migrate/20160804143438_init_schema.rb'
- 'db/migrate/20170630161747_squasher_clean.rb'
- 'bin/brakeman'
- 'bin/bundle'
- 'bin/bundle-audit'
- 'bin/cap'
- 'bin/capify'
- 'bin/mry'
- 'bin/puma'
- 'bin/pumactl'
- 'bin/rails'
- 'bin/rake'
- 'bin/rspec'
- 'bin/rubocop'
- 'bin/setup'
- 'bin/sidekiq'
- 'bin/sidekiqctl'
- 'bin/squasher'
- 'bin/update'
- 'bin/whenever'
- 'bin/wheneverize'
- 'bin/yarn'
- 'bin/license_finder'
- 'spec/spec_helper.rb'
- 'spec/rails_helper.rb'
DisplayCopNames: true
DisplayStyleGuide: true
TargetRailsVersion: 5.1
Rails:
Enabled: true
# Allow block comments
Style/BlockComments:
Enabled: false
# Disable
Style/Documentation:
Enabled: false
Layout/DotPosition:
Enabled: true
EnforcedStyle: leading
Style/FrozenStringLiteralComment:
Enabled: true
EnforcedStyle: never
# Recheck this cop later
Style/FlipFlop:
Description: 'Checks for flip flops'
StyleGuide: '#no-flip-flops'
Enabled: true
# Recheck this cop later
Style/RedundantException:
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
StyleGuide: '#no-explicit-runtimeerror'
Enabled: true
# Recheck this cop later
Style/SafeNavigation:
Description: >-
This cop transforms usages of a method call safeguarded by
a check for the existance of the object to
safe navigation (`&.`).
Enabled: true
# Recheck this cop later
Style/SignalException:
Description: 'Checks for proper usage of fail and raise.'
StyleGuide: '#prefer-raise-over-fail'
Enabled: true
# Enable with EnforcedStyle is space
Layout/SpaceInsideStringInterpolation:
EnforcedStyle: space
Enabled: true
# Enable with EnforcedStyle is single_quotes
Style/StringLiterals:
EnforcedStyle: single_quotes
Enabled: true
# Limit lines to 80 characters
Metrics/LineLength:
Enabled: false
# TimeZone stuff
Rails/TimeZone:
EnforcedStyle: strict
Enabled: true
# Identifies possible cases where Active Record save! or related should be used.
Rails/SaveBang:
Enabled: true
# Suggests the usage of an auto resource cleanup version of a method (if available)
Style/AutoResourceCleanup:
Enabled: true
# Preferred collection methods
Style/CollectionMethods:
Enabled: true
# Use UTF-8 as the source file encoding
Style/Encoding:
Enabled: true
# Use `raise` or `fail` with an explicit exception class and
# message, rather than just a message.
Style/ImplicitRuntimeError:
Enabled: true
# Avoid chaining a method call on a do...end block
Style/MethodCalledOnDoEndBlock:
Enabled: true
# Check for a newline after the assignment operator in multi-line assignments
Layout/MultilineAssignmentLayout:
Enabled: true
# Just ignore order of gems in Gemfile
Bundler/OrderedGems:
Enabled: false
# Use %i or %I for an array of symbols.
Style/SymbolArray:
Enabled: false
Metrics/BlockLength:
Exclude:
- 'app/documentation/**/*.rb'
- 'config/routes.rb'
- 'config/environments/production.rb'
- 'config/sitemap.rb'
- 'spec/**/*.rb'
Metrics/ClassLength:
Exclude:
- 'app/documentation/**/*.rb'
Style/GuardClause:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/ConditionalAssignment:
Enabled: true
EnforcedStyle: assign_to_condition
Naming/FileName:
Enabled: true
Exclude:
- 'config/initializers/rack-cors.rb'
- 'config/initializers/rack-force_domain.rb'
- 'config/initializers/rack-mini-profiler.rb'
- 'config/initializers/rack-timeout.rb'
- 'spec/support/capybara-email.rb'
- 'spec/support/shoulda-callback-matchers.rb'
- 'spec/support/shoulda-matchers.rb'
# Disable broken cop
Style/FormatStringToken:
Description: 'Use a consistent style for format string tokens.'
Enabled: false