-
Notifications
You must be signed in to change notification settings - Fork 1
/
.rubocop.yml
199 lines (186 loc) · 4.34 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
# See pages relaed at https://docs.rubocop.org/rubocop/1.12/cops_layout.html
# Rubocop extensions
require:
- rubocop-rake
- rubocop-rspec
inherit_mode:
merge:
- Exclude # Merge my AllCops.Excllude with default exludes from https://github.com/rubocop/rubocop/blob/master/config/default.yml
AllCops:
TargetRubyVersion: 3.0
Include:
- lib/**/*.rb
- spec/**/*.rb
Exclude:
# Travis: during build there will be a lot of rubocop config files in this pat which will cause build failure as the refer to gems which are not installed by this project.
# See https://github.com/rubocop/rubocop/issues/9832
- gemfiles/vendor/bundle/**/*
NewCops: enable
Gemspec/DeprecatedAttributeAssignment:
Enabled: true
Gemspec/RequireMFA:
Enabled: true
Layout/LineEndStringConcatenationIndentation:
Enabled: true
Layout/EmptyLineBetweenDefs:
Enabled: true
Exclude:
- lib/jekyll-glossary_tooltip/errors.rb
Layout/SpaceBeforeBrackets:
Enabled: true
Lint/AmbiguousAssignment:
Enabled: true
Lint/DeprecatedConstants:
Enabled: true
Lint/DuplicateBranch:
Enabled: true
Lint/DuplicateRegexpCharacterClassElement:
Enabled: true
Lint/EmptyBlock:
Enabled: true
Lint/EmptyClass:
Enabled: true
Lint/AmbiguousOperatorPrecedence:
Enabled: true
Lint/AmbiguousRange:
Enabled: true
Lint/IncompatibleIoSelectWithFiberScheduler:
Enabled: true
Lint/RequireRelativeSelfPath:
Enabled: true
Lint/UselessRuby2Keywords:
Enabled: true
Lint/EmptyInPattern:
Enabled: true
Lint/LambdaWithoutLiteralBlock:
Enabled: true
Layout/LineLength:
Max: 120
Lint/NoReturnInBeginEndBlocks:
Enabled: true
Lint/NumberedParameterAssignment:
Enabled: true
Lint/OrAssignmentToConstant:
Enabled: true
Lint/RedundantDirGlobSort:
Enabled: true
Lint/SymbolConversion:
Enabled: true
Lint/ToEnumArguments:
Enabled: true
Lint/TripleQuotes:
Enabled: true
Lint/UnexpectedBlockArity:
Enabled: true
Lint/UnmodifiedReduceAccumulator:
Enabled: true
Lint/UnreachableCode:
Severity: error
Lint/UselessAccessModifier:
Enabled: false
Metrics/AbcSize:
Enabled: true
Metrics/BlockLength:
Enabled: true
Max: 100
Metrics/MethodLength:
Enabled: true
Max: 25
Naming/FileName:
Enabled: false
Exclude:
- lib/jekyll-glossary_tooltip.rb
Naming/InclusiveLanguage:
Enabled: true
Naming/BlockForwarding:
Enabled: true
Security/IoMethods:
Enabled: true
Style/ArgumentsForwarding:
Enabled: true
Style/CollectionCompact:
Enabled: true
Style/Documentation:
Enabled: true
Exclude:
- lib/jekyll-glossary_tooltip/errors.rb
Style/DocumentDynamicEvalDefinition:
Enabled: true
Style/EndlessMethod:
Enabled: true
Style/HashConversion:
Enabled: true
Style/HashExcept:
Enabled: true
Style/IfWithBooleanLiteralBranches:
Enabled: true
Style/InPatternThen:
Enabled: true
Style/MultilineInPatternThen:
Enabled: true
Style/NegatedIfElseCondition:
Enabled: true
Style/NilLambda:
Enabled: true
Style/QuotedSymbols:
Enabled: true
Style/RedundantArgument:
Enabled: true
Style/RegexpLiteral:
Enabled: false
Style/SingleLineMethods:
Enabled: true
Exclude:
- lib/jekyll-glossary_tooltip/errors.rb
Style/StringChars:
Enabled: true
Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
Enabled: true
EnforcedStyle: double_quotes
Style/SwapValues:
Enabled: true
Style/FileRead:
Enabled: true
Style/FileWrite:
Enabled: true
Style/MapToHash:
Enabled: true
Style/NumberedParameters:
Enabled: true
Style/NumberedParametersLimit:
Enabled: true
Style/OpenStructUse:
Enabled: true
Style/RedundantSelfAssignmentBranch:
Enabled: true
Style/SelectByRegexp:
Enabled: true
# Reference: https://github.com/rubocop/rubocop-rake/blob/master/config/default.yml
Rake:
Enabled: true
# Reference:
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html
# https://github.com/rubocop/rubocop-rspec/blob/master/config/default.yml
RSpec:
Enabled: true
RSpec/FilePath:
# Disable to match structure of lib/. For jekyll plugin inclusion convention features, not having lib/jekyll/sth.rb but lib/jekyll-sth.rb
Enabled: false
RSpec/IdenticalEqualityAssertion:
Enabled: true
RSpec/Rails/AvoidSetupHook:
Enabled: false
RSpec/BeforeAfterAll:
Enabled: false
RSpec/ExcessiveDocstringSpacing:
Enabled: true
RSpec/SubjectDeclaration:
Enabled: true
RSpec/FactoryBot/SyntaxMethods:
Enabled: true
RSpec/MultipleMemoizedHelpers:
Enabled: true
Max: 10