-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.rubocop.yml
More file actions
177 lines (131 loc) · 2.7 KB
/
.rubocop.yml
File metadata and controls
177 lines (131 loc) · 2.7 KB
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
AllCops:
NewCops: enable
TargetRubyVersion: 3.3
Exclude:
- 'db/**/*'
- 'config/**/*'
- 'script/**/*'
- 'bin/**/*'
- 'vendor/**/*'
- 'node_modules/**/*'
- 'tmp/**/*'
- '.git/**/*'
- 'coverage/**/*'
SuggestExtensions: false
inherit_gem:
rubocop-rails-omakase: rubocop.yml
# Plugins
require: []
plugins:
# - rubocop-rails
- rubocop-rspec
- rubocop-performance
# Ruby style
Style/Documentation:
Enabled: false
Style/StringLiterals:
EnforcedStyle: single_quotes
Style/ClassAndModuleChildren:
Enabled: false
Style/EmptyElse:
Enabled: false
Style/SafeNavigationChainLength:
Enabled: false
# Metrics
Metrics/BlockLength:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/tasks/**/*'
- 'Guardfile'
Metrics/MethodLength:
Max: 50
Metrics/AbcSize:
Max: 40
Metrics/CyclomaticComplexity:
Max: 15
Metrics/PerceivedComplexity:
Max: 15
Metrics/ClassLength:
Max: 200
Metrics/ModuleLength:
Max: 150
Metrics/ParameterLists:
Max: 8
# Layout
# TODO-mb: this one is frustrating.
# Fix to allow more left-aligned params.
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
Enabled: true
Layout/LineLength:
Max: 120
# Rails
Rails:
Enabled: true
Rails/HasManyOrHasOneDependent:
Enabled: false
Rails/I18nLocaleTexts:
Enabled: false
# RSpec
RSpec:
Enabled: true
RSpec/ExampleLength:
Max: 40
# Default 3
# I'm not sure this is good?
RSpec/NestedGroups:
Max: 5
RSpec/MultipleMemoizedHelpers:
Max: 20
RSpec/MultipleExpectations:
Max: 10
RSpec/AnyInstance:
Enabled: false
RSpec/MessageSpies:
Enabled: false
RSpec/StubbedMock:
Enabled: false
RSpec/VoidExpect:
Enabled: false
RSpec/ContextWording:
Enabled: false
RSpec/LeakyConstantDeclaration:
Enabled: false
RSpec/BeforeAfterAll:
Enabled: false
# Allow non-snake_case variable names for compatibility with existing code
# This is a temporary allowance that should be addressed in future refactorings
Naming/VariableName:
Enabled: false
RSpec/VariableName:
Exclude:
- 'spec/Facades/canvas_facade_spec.rb'
- 'spec/Facades/extension_facade_base_spec.rb'
Naming/MethodParameterName:
Enabled: false
Naming/BlockParameterName:
Enabled: false
Naming/FileName:
Enabled: false
# Canvas-specific naming conventions may not follow Ruby conventions
Naming/AccessorMethodName:
Enabled: false
Naming/MethodName:
Enabled: false
# Sometimes OpenStruct is necessary for compatibility with APIs
Style/OpenStructUse:
Enabled: false
# Lints
Lint/MissingSuper:
Enabled: false
Lint/DuplicateMethods:
Enabled: false
Lint/ConstantDefinitionInBlock:
Enabled: false
Lint/Debugger:
Enabled: false
Lint/EmptyBlock:
Enabled: false
Lint/EmptyFile:
Enabled: false