|
1 |
| -################################################################################ |
2 |
| -# Metrics |
3 |
| -################################################################################ |
| 1 | +inherit_from: base_rubocop.yml |
4 | 2 |
|
5 |
| -Metrics/LineLength: |
6 |
| - Enabled: false |
7 |
| - |
8 |
| -Metrics/AbcSize: |
9 |
| - Enabled: false |
10 |
| - |
11 |
| -################################################################################ |
12 |
| -# Style |
13 |
| -################################################################################ |
14 |
| - |
15 |
| -# Executables are conventionally named bin/foo-bar |
16 |
| -Style/FileName: |
17 |
| - Exclude: |
18 |
| - - bin/**/* |
19 |
| - |
20 |
| -# We don't (currently) document our code |
21 |
| -Style/Documentation: |
22 |
| - Enabled: false |
23 |
| - |
24 |
| -# Always use double-quotes to keep things simple |
25 |
| -Style/StringLiterals: |
26 |
| - EnforcedStyle: double_quotes |
27 |
| - |
28 |
| -Style/StringLiteralsInInterpolation: |
29 |
| - EnforcedStyle: double_quotes |
30 |
| - |
31 |
| -# Use a trailing comma to keep diffs clean when elements are inserted or removed |
32 |
| -Style/TrailingCommaInArguments: |
33 |
| - EnforcedStyleForMultiline: comma |
34 |
| - |
35 |
| -Style/TrailingCommaInLiteral: |
36 |
| - EnforcedStyleForMultiline: comma |
37 |
| - |
38 |
| -# We avoid GuardClause because it can result in "suprise return" |
39 |
| -Style/GuardClause: |
40 |
| - Enabled: false |
41 |
| - |
42 |
| -# We avoid IfUnlessModifier because it can result in "suprise if" |
43 |
| -Style/IfUnlessModifier: |
44 |
| - Enabled: false |
45 |
| - |
46 |
| -# We don't care about the fail/raise distinction |
47 |
| -Style/SignalException: |
48 |
| - EnforcedStyle: only_raise |
49 |
| - |
50 |
| -Style/DotPosition: |
51 |
| - EnforcedStyle: trailing |
52 |
| - |
53 |
| -# Common globals we allow |
54 |
| -Style/GlobalVars: |
55 |
| - AllowedVariables: |
56 |
| - - "$statsd" |
57 |
| - - "$mongo" |
58 |
| - - "$rollout" |
59 |
| - |
60 |
| -# Using english names requires loading an extra module, which is annoying, so |
61 |
| -# we prefer the perl names for consistency. |
62 |
| -Style/SpecialGlobalVars: |
63 |
| - EnforcedStyle: use_perl_names |
64 |
| - |
65 |
| -# We have common cases where has_ and have_ make sense |
66 |
| -Style/PredicateName: |
67 |
| - Enabled: true |
68 |
| - NamePrefixBlacklist: |
69 |
| - - is_ |
70 |
| - |
71 |
| -# We use %w[ ], not %w( ) because the former looks like an array |
72 |
| -Style/PercentLiteralDelimiters: |
73 |
| - PreferredDelimiters: |
74 |
| - "%i": "[]" |
75 |
| - "%I": "[]" |
76 |
| - "%w": "[]" |
77 |
| - "%W": "[]" |
78 |
| - |
79 |
| -# Allow "trivial" accessors when defined as a predicate? method |
80 |
| -Style/TrivialAccessors: |
81 |
| - AllowPredicates: true |
82 |
| - |
83 |
| -Style/Next: |
84 |
| - Enabled: false |
85 |
| - |
86 |
| -# We think it's OK to use the "extend self" module pattern |
87 |
| -Style/ModuleFunction: |
88 |
| - Enabled: false |
89 |
| - |
90 |
| -# Disallow extra spacing for token alignment |
91 |
| -Style/ExtraSpacing: |
92 |
| - AllowForAlignment: false |
93 |
| - |
94 |
| -# and/or in conditionals has no meaningful difference (only gotchas), so we |
95 |
| -# disallow them there. When used for control flow, the difference in precedence |
96 |
| -# can make for a less noisy expression, as in: |
97 |
| -# |
98 |
| -# x = find_x or raise XNotFound |
99 |
| -# |
100 |
| -Style/AndOr: |
101 |
| - EnforcedStyle: conditionals |
102 |
| - |
103 |
| -Style/AlignParameters: |
104 |
| - EnforcedStyle: with_fixed_indentation |
105 |
| - |
106 |
| -Style/MultilineOperationIndentation: |
107 |
| - EnforcedStyle: indented |
108 |
| - |
109 |
| -Style/AlignHash: |
110 |
| - EnforcedLastArgumentHashStyle: ignore_implicit |
111 |
| - |
112 |
| -# This has the behavior we want, but it has a bug in it which produces a lot of false positives |
113 |
| -# https://github.com/bbatsov/rubocop/issues/3462 |
114 |
| -# MultilineMethodCallBraceLayout: |
115 |
| -# EnforcedStyle: new_line |
116 |
| - |
117 |
| -################################################################################ |
118 |
| -# Performance |
119 |
| -################################################################################ |
120 |
| - |
121 |
| -Performance/RedundantMerge: |
122 |
| - Enabled: false |
123 |
| - |
124 |
| -################################################################################ |
125 |
| -# Rails - disable things because we're primarily non-rails |
126 |
| -################################################################################ |
127 |
| - |
128 |
| -Rails/Delegate: |
129 |
| - Enabled: false |
130 |
| - |
131 |
| -Rails/TimeZone: |
132 |
| - Enabled: false |
133 |
| - |
134 |
| -################################################################################ |
135 |
| -# Specs - be more lenient on length checks and block styles |
136 |
| -################################################################################ |
137 |
| - |
138 |
| -Metrics/ModuleLength: |
139 |
| - Exclude: |
140 |
| - - spec/**/* |
141 |
| - |
142 |
| -Metrics/MethodLength: |
143 |
| - Exclude: |
144 |
| - - spec/**/* |
145 |
| - |
146 |
| -Style/ClassAndModuleChildren: |
147 |
| - Exclude: |
148 |
| - - spec/**/* |
149 |
| - |
150 |
| -Style/BlockDelimiters: |
151 |
| - Exclude: |
152 |
| - - spec/**/* |
| 3 | +AllCops: |
| 4 | + TargetRubyVersion: 2.3 |
0 commit comments