forked from prawnpdf/prawn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
229 lines (219 loc) · 4.72 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
Encoding:
# To be safe we are leaving these files encoded ASCII-8BIT as
# discussed at https://github.com/prawnpdf/prawn/pull/705
Exclude:
- lib/prawn/images/jpg.rb
- lib/prawn/images/png.rb
- lib/prawn/images.rb
- spec/png_spec.rb
# These cops need to remain disabled for valid reasons on this code base
# We need to reference non-ascii characters when testing and explaining
# behavior related to win-1252, UTF-8 and UTF-16 encodings for example.
AsciiComments:
Enabled: false
# We don't always prefer modified if statements even if they do fit on
# a line.
IfUnlessModifier:
Enabled: false
# In this case we supress Prawn::Errors::CannotFit while trying to scale
# text down to fit.
HandleExceptions:
Exclude:
- lib/prawn/text/formatted/box.rb
# %w() style arrays don't always look better.
WordArray:
Enabled: false
# Due to some layout constraints in our examples we want to allow these rule to
# be ignored in the manual.
Style/ClosingParenthesisIndentation:
Exclude:
- manual/**/*
LineEndConcatenation:
Exclude:
- manual/**/*
MultilineOperationIndentation:
Exclude:
- manual/**/*
- prawn.gemspec
Style/SpaceInsideParens:
Exclude:
- manual/**/*
Style/SpaceBeforeFirstArg:
Exclude:
- manual/**/*
# This file shows examples on how to instantiate a document in multiple ways,
# it does not actually do the instantiation and isn't actually shadowing any
# variables.
ShadowingOuterLocalVariable:
Exclude:
- manual/basic_concepts/creation.rb
# We currently ignore usage of semicolons on this page of the manual so we
# don't have to worry about changing the content of the manual for now.
Semicolon:
Exclude:
- manual/bounding_box/nesting.rb
# This cops are candidates for enabling and doing the related cleanup and/or
# refactoring
Style/BlockDelimiters:
Enabled: false
EnforcedStyle: semantic
Void:
Enabled: false
StringLiterals:
Enabled: false
HashSyntax:
Enabled: false
UselessAssignment:
Enabled: false
Lambda:
Enabled: false
LineLength:
Enabled: false
SpaceBeforeBlockBraces:
Enabled: false
SpaceInsideBrackets:
Enabled: false
FormatString:
Enabled: false
CollectionMethods:
Enabled: false
DotPosition:
Enabled: false
SingleLineBlockParams:
Enabled: false
PercentLiteralDelimiters:
Enabled: false
Documentation:
Enabled: false
RegexpLiteral:
Enabled: false
MethodLength:
Enabled: false
VariableInterpolation:
Enabled: false
AndOr:
Enabled: false
AssignmentInCondition:
Enabled: false
ClassAndModuleChildren:
Enabled: false
NumericLiterals:
Enabled: false
DoubleNegation:
Enabled: false
SelfAssignment:
Enabled: false
ClassLength:
Enabled: false
CaseEquality:
Enabled: false
RedundantSelf:
Enabled: false
BlockNesting:
Enabled: false
NegatedWhile:
Enabled: false
MultilineIfThen:
Enabled: false
ModuleFunction:
Enabled: false
CyclomaticComplexity:
Enabled: false
UnreachableCode:
Enabled: false
AccessorMethodName:
Enabled: false
Style/SpaceAroundKeyword:
Enabled: false
PredicateName:
Enabled: false
ConstantName:
Enabled: false
MethodName:
Enabled: false
Alias:
Enabled: false
RedundantReturn:
Enabled: false
WhileUntilModifier:
Enabled: false
StringConversionInInterpolation:
Enabled: false
RedundantBegin:
Enabled: false
PerlBackrefs:
Enabled: false
ClassVars:
Enabled: false
ParameterLists:
Enabled: false
AbcSize:
Enabled: false
PerceivedComplexity:
Enabled: false
UnusedBlockArgument:
Enabled: false
UnusedMethodArgument:
Enabled: false
Next:
Enabled: false
ClassCheck:
Enabled: false
SpaceBeforeComma:
Enabled: false
StringLiteralsInInterpolation:
Enabled: false
GuardClause:
Enabled: false
BlockEndNewline:
Enabled: false
Style/MultilineMethodCallBraceLayout:
Enabled: false
Performance/StringReplacement:
Enabled: false
Style/SymbolProc:
Enabled: false
Style/ExtraSpacing:
Enabled: false
Style/SpaceAroundOperators:
Enabled: false
Style/ParallelAssignment:
Enabled: false
Style/IndentArray:
Enabled: false
Style/SignalException:
Enabled: false
Style/MultilineArrayBraceLayout:
Enabled: false
Style/MutableConstant:
Enabled: false
Style/ConditionalAssignment:
Enabled: false
Style/ZeroLengthPredicate:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Style/MultilineTernaryOperator:
Enabled: false
Style/UnneededInterpolation:
Enabled: false
Style/IfInsideElse:
Enabled: false
Style/IdenticalConditionalBranches:
Enabled: false
Performance/RedundantBlockCall:
Enabled: false
Performance/RedundantMerge:
Enabled: false
Style/RedundantParentheses:
Enabled: false
Performance/RangeInclude:
Enabled: false
Lint/UselessAccessModifier:
Enabled: false
Lint/LiteralInCondition:
Enabled: false
Performance/TimesMap:
Enabled: false
Lint/LiteralInCondition:
Enabled: false