-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.rubocop.yml
56 lines (49 loc) · 1.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
AllCops:
Exclude:
- lib/rails_stuff/generators/*/templates/*.rb
- tmp/**/*
Rails: {Enabled: true}
Layout/AlignParameters:
# Disable, till rubocop supports combination of styles.
# Use one of this styles where appropriate, keep it clean, compact and readable.
Enabled: false
# EnforcedStyle:
# - with_first_parameter
# - with_fixed_indentation
# Breaks
#
# I18n.t(key,
# param: val,
# # ...
# )
Layout/ClosingParenthesisIndentation: {Enabled: false}
Layout/DotPosition: {EnforcedStyle: trailing}
# Same as Layout/ClosingParenthesisIndentation
Layout/MultilineMethodCallBraceLayout: {Enabled: false}
Layout/MultilineMethodCallIndentation: {EnforcedStyle: indented}
Layout/MultilineOperationIndentation: {EnforcedStyle: indented}
Layout/SpaceInsideHashLiteralBraces: {EnforcedStyle: no_space}
# Offences named scopes and `expect {}.to change {}`.
Lint/AmbiguousBlockAssociation: {Enabled: false}
# We use it in describe messages.
Lint/InterpolationCheck:
Exclude:
- spec/**/*
Naming/PredicateName: {Enabled: false}
Naming/VariableNumber: {EnforcedStyle: snake_case}
Style/Alias: {Enabled: false}
Style/Documentation: {Enabled: false}
Style/IfUnlessModifier: {Enabled: false}
Style/GuardClause: {Enabled: false}
Style/Lambda: {Enabled: false}
Style/ModuleFunction: {Enabled: false}
Style/NestedParenthesizedCalls: {Enabled: false}
Style/SignalException: {EnforcedStyle: only_raise}
Style/TrailingCommaInArguments: {Enabled: false}
Style/TrailingCommaInLiteral: {EnforcedStyleForMultiline: comma}
Metrics/AbcSize: {Max: 21}
# Other metrics are just enough.
# This one offences all specs, routes and some initializers.
Metrics/BlockLength: {Enabled: false}
Metrics/LineLength: {Max: 100}
Metrics/MethodLength: {Max: 30}