forked from HealthTap/sass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
126 lines (126 loc) · 3.47 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
AccessorMethodName:
# We have good reasons for choosing our method names.
Enabled: false
AlignParameters:
# Natalie doesn't like to align parameters to the method call.
Enabled: false
BlockNesting:
# We'll catch this in code review. There are some legitimate uses.
Enabled: false
CharacterLiteral:
# Character literals are pretty useful when working with text like we do.
Enabled: false
ClassLength:
# It's not worth bending over backwards to avoid long classes.
Enabled: false
CollectionMethods:
PreferredMethods:
collect: 'map'
reduce: 'inject'
detect: 'find'
find_all: 'select'
CyclomaticComplexity:
# It's difficult to reason about what will reduce cyclomatic complexity.
Enabled: false
Documentation:
# TODO: We need to add a bunch of docs before we can enable this.
Enabled: false
DotPosition:
# This check doesn't want chained method invocation to end with a dot.
# But we like to do that.
Enabled: false
EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
Encoding:
# We use utf-8 comments when utf-8 characters are in use.
Enabled: false
EndAlignment:
# Our alignment style differs significantly
# and this doesn't seem to be a big deal.
Enabled: false
FavorSprintf:
# We like the string % operator.
Enabled: false
HandleExceptions:
# We legitimately ignore exceptions in some cases and this is easy to catch in code review.
Enabled: false
HashSyntax:
# We are a 1.8 compatable project still.
Enabled: false
HashMethods:
# has_xxx? reads better.
Enabled: false
IfUnlessModifier:
# We don't feel strongly about this.
Enabled: false
IndentationConsistency:
# We use indentation to convey meaning more often than we screw it up.
Enabled: false
IndentationWidth:
Enabled: false
BlockAlignment:
Enabled: false
Lambda:
# We are a 1.8 compatible project still.
Enabled: false
LineLength:
Enabled: true
Max: 100
Loop:
# This isn't a big deal.
Enabled: false
MethodLength:
# TODO: This max should actually be 25 but that will require significant refactoring.
Max: 50
CountComments: false
ModuleFunction:
# The module_function declaration makes methods private so it means you can't use the module as a module.
Enabled: false
ParenthesesAroundCondition:
AllowSafeAssignment: true
PerlBackrefs:
# We like perl backrefs.
Enabled: false
PredicateName:
# We have good reasons for choosing our method names.
Enabled: false
RaiseArgs:
# We prefer "raise Exception.new(msg)".
EnforcedStyle: compact
RedundantReturn:
# We allow explicit returns for multiple return values.
AllowMultipleReturnValues: true
Semicolon:
# Makes a good line separator
Enabled: false
SignalException:
# We like saying raise.
Enabled: false
SingleLineBlockParams:
# We have good reasons for choosing our argument names.
Enabled: false
SingleLineMethods:
# We like single line methods for simple methods.
Enabled: false
SpaceAroundBlockBraces:
# We prefer "foo {|arg| body}".
EnforcedStyle: no_space_inside_braces
SpaceBeforeBlockParameters: false
SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
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
TrailingComma:
Enabled: false
TrivialAccessors:
AllowPredicates: true
ExactNameMatch: true
WhenThen:
# We like semi-colons.
Enabled: false
WhileUntilModifier:
# We don't feel strongly about this.
Enabled: false