-
Notifications
You must be signed in to change notification settings - Fork 6
/
.rubocop.yml
172 lines (127 loc) · 2.88 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
require:
- rubocop-rails
AllCops:
TargetRubyVersion: 2.7
NewCops: enable
Exclude:
- ./Rakefile
- ./config.ru
- ./Gemfile
- bin/**/*
- db/**/*
- config/**/*
- vendor/bundle/ruby/**/*
Rails:
Enabled: true
# Use &&/|| instead of and/or.
Style/AndOr:
Enabled: true
# Use only ascii symbols in identifiers.
Style/AsciiComments:
Enabled: false
# Document classes and non-namespace modules.
Style/Documentation:
Enabled: false
# Use the lambda method for multi-line lambdas.
Style/Lambda:
Enabled: false
# Limit lines to 79 characters.
Layout/LineLength:
Max: 79
Enabled: false
Metrics/MethodLength:
Max: 30
Enabled: true
# Don't use self where it's not needed.
Style/RedundantSelf:
Enabled: false
# Checks for proper usage of fail and raise.
Style/SignalException:
Enabled: false
# Prefer ' strings when you don't need string interpolation or special symbols.
Style/StringLiterals:
EnforcedStyle: double_quotes
SupportedStyles:
- single_quotes
- double_quotes
# Align block ends correctly.
Layout/BlockAlignment:
Enabled: false
# Avoid the use of attr. Use attr_reader and attr_accessor instead.
Style/Attr:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Lint/UnusedBlockArgument:
Enabled: false
Lint/UnusedMethodArgument:
Enabled: false
Layout/MultilineOperationIndentation:
Enabled: false
Metrics/AbcSize:
Max: 20
Exclude:
- "test/**/*"
Metrics/CyclomaticComplexity:
Max: 30
Style/RescueModifier:
Severity: warning
AutoCorrect: false
# node(:id) { |m| m.file_id }
Style/SymbolProc:
Severity: warning
AutoCorrect: false
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Style/ConditionalAssignment:
Enabled: false
Style/EmptyMethod:
Enabled: false
Style/BlockComments:
Enabled: false
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: no_comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/RegexpLiteral:
EnforcedStyle: percent_r
Layout/EmptyLineAfterMagicComment:
Enabled: false
Layout/EmptyLineAfterGuardClause:
Enabled: false
Style/PercentLiteralDelimiters:
Enabled: false
Style/SymbolArray:
Enabled: false
Style/NumericLiterals:
Enabled: false
Style/FormatStringToken:
Enabled: false
Style/FormatString:
Enabled: false
Style/IfUnlessModifier:
Exclude:
- "lib/tasks/*.rake"
Lint/AmbiguousBlockAssociation:
Enabled: false
Rails/FilePath:
Enabled: false
Metrics/ClassLength:
Exclude:
- "test/**/*"
Metrics/BlockLength:
Exclude:
- "lib/tasks/*.rake"
- "**/*_test.rb"
# turned off because this app doesn't care about timezone
Rails/Date:
Enabled: false
Naming/VariableNumber:
Enabled: false
Style/KeywordParametersOrder:
Enabled: false
Lint/EmptyBlock:
Exclude:
- "test/factories/*.rb"