forked from sass/sass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rubocop.yml
193 lines (190 loc) · 5.38 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
inherit_from: .rubocop_todo.yml
Lint/BlockAlignment:
Enabled: false
Lint/EndAlignment:
# Our alignment style differs significantly
# and this doesn't seem to be a big deal.
Enabled: false
Lint/HandleExceptions:
# We legitimately ignore exceptions in some cases and this is easy to catch in code review.
Enabled: false
Lint/Loop:
# This isn't a big deal.
Enabled: false
Metrics/BlockNesting:
# We'll catch this in code review. There are some legitimate uses.
Enabled: false
Metrics/ClassLength:
# It's not worth bending over backwards to avoid long classes.
Enabled: false
Metrics/CyclomaticComplexity:
# It's difficult to reason about what will reduce cyclomatic complexity.
Enabled: false
Metrics/LineLength:
Enabled: true
Max: 110
Metrics/MethodLength:
# TODO: This max should actually be 25 but that will require significant refactoring.
Max: 50
CountComments: false
Style/AccessorMethodName:
# We have good reasons for choosing our method names.
Enabled: false
Style/AlignParameters:
# Natalie doesn't like to align parameters to the method call.
Enabled: false
Style/CharacterLiteral:
# Character literals are pretty useful when working with text like we do.
Enabled: false
Style/CollectionMethods:
PreferredMethods:
collect: 'map'
reduce: 'inject'
detect: 'find'
find_all: 'select'
Style/DeprecatedHashMethods:
# has_xxx? reads better.
Enabled: false
Style/Documentation:
# TODO: We need to add a bunch of docs before we can enable this.
Enabled: false
Style/DotPosition:
# This check doesn't want chained method invocation to end with a dot.
# But we like to do that.
Enabled: false
Style/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
Style/Encoding:
# We use utf-8 comments when utf-8 characters are in use.
Enabled: false
Style/FormatString:
# We like the string % operator.
Enabled: false
Style/HashSyntax:
# We are a 1.8 compatable project still.
Enabled: false
Style/IfUnlessModifier:
# We don't feel strongly about this.
Enabled: false
Style/IndentationConsistency:
# We use indentation to convey meaning more often than we screw it up.
Enabled: false
Style/IndentationWidth:
Enabled: false
Style/Lambda:
# We are a 1.8 compatible project still.
Enabled: false
Style/ModuleFunction:
# The module_function declaration makes methods private so it means you can't use the module as a module.
Enabled: false
Style/ParenthesesAroundCondition:
AllowSafeAssignment: true
Style/PerlBackrefs:
# We like perl backrefs.
Enabled: false
Style/PredicateName:
# We have good reasons for choosing our method names.
Enabled: false
Style/RaiseArgs:
# We prefer "raise Exception.new(msg)".
EnforcedStyle: compact
Style/RedundantReturn:
# We allow explicit returns for multiple return values.
AllowMultipleReturnValues: true
Style/Semicolon:
# Makes a good line separator
Enabled: false
Style/SignalException:
# We like saying raise.
Enabled: false
Style/SingleLineBlockParams:
# We have good reasons for choosing our argument names.
Enabled: false
Style/SingleLineMethods:
# We like single line methods for simple methods.
Enabled: false
Style/SpaceBeforeBlockBraces:
# We prefer "foo {|arg| body}".
EnforcedStyle: space
Style/SpaceInsideBlockBraces:
EnforcedStyle: no_space
SpaceBeforeBlockParameters: false
Style/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
Style/StringLiterals:
# They say to not use double quoted strings unless there is interpolation.
# While this gives a marginal parse time speedup, it makes working with
# strings annoying.
Enabled: false
Style/TrailingComma:
Enabled: false
Style/TrivialAccessors:
AllowPredicates: true
ExactNameMatch: true
Style/WhenThen:
# We like semi-colons.
Enabled: false
Style/WhileUntilModifier:
# We don't feel strongly about this.
Enabled: false
Lint/AssignmentInCondition:
Enabled: true
Lint/FormatParameterMismatch:
Enabled: true
Lint/NestedMethodDefinition:
Enabled: true
Lint/NonLocalExitFromIterator:
# We do this a number of times and it cleans up the code.
Enabled: false
Lint/StringConversionInInterpolation:
Enabled: true
Lint/UselessAccessModifier:
Enabled: true
Lint/UnneededDisable:
Enabled: true
Lint/UnusedBlockArgument:
Enabled: true
Lint/UnusedMethodArgument:
# Lots of polymorphic methods take arguments
# they don't use.
Enabled: false
Metrics/AbcSize:
# TODO: It's probably good to address this complexity measurement
# but it's a lot of work so this remains disabled.
Enabled: false
Metrics/ModuleLength:
Enabled: true
Metrics/PerceivedComplexity:
# TODO: It's probably good to address this complexity measurement
# but it's a lot of work so this remains disabled.
Enabled: false
Performance/FlatMap:
# This requires a newer version of ruby than we require.
Enabled: false
Performance/ReverseEach:
Enabled: true
Performance/StringReplacement:
Enabled: true
Style/BarePercentLiterals:
Enabled: true
Style/ClassAndModuleChildren:
# We hates it.
Enabled: false
Style/ClassCheck:
Enabled: true
Style/ClosingParenthesisIndentation:
Enabled: true
Style/DoubleNegation:
# We don't dislike double negation.
Enabled: false
Style/EachWithObject:
# This requires a newer version of ruby than we require.
Enabled: false
Style/EmptyLinesAroundBlockBody:
Enabled: true
Style/ExtraSpacing:
Enabled: true
Style/FirstParameterIndentation:
Enabled: true
Style/GuardClause:
Enabled: true