This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
100 lines (74 loc) · 2.18 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
require: rubocop-rspec
AllCops:
Include:
- "**/Rakefile"
- "**/config.ru"
- "**/Gemfile"
Exclude:
- "bin/*"
- "chef/**/*"
- "db/**/*"
- "features/**/*"
- "node_modules/**/*"
- "script/**/*"
- "selenium_features/**/*"
- "vendor/**/*"
- "tmp/**/*"
RunRailsCops: true
### Metrics ####################################################################
Metrics/AbcSize:
Max: 15 # default
Metrics/BlockNesting:
Max: 3 # default
Metrics/ClassLength:
Max: 150 # default: 100
Metrics/ModuleLength:
Max: 150 # default: 100
Metrics/CyclomaticComplexity:
Max: 6 # default
Metrics/LineLength:
Max: 80 # default
AllowURI: true
Metrics/MethodLength:
Max: 15 # default: 10
Metrics/ParameterLists:
Max: 5 # default
Metrics/PerceivedComplexity:
Max: 7 # default
### Style ######################################################################
Style/AlignHash:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
Style/AlignParameters:
EnforcedStyle: with_fixed_indentation
Style/AndOr:
# Whether `and` and `or` are banned only in conditionals (conditionals)
# or completely (always).
EnforcedStyle: conditionals
Style/BlockDelimiters:
EnforcedStyle: line_count_based
Style/IndentHash:
EnforcedStyle: consistent
Style/MultilineOperationIndentation:
EnforcedStyle: indented
# Not enforcing single space before first arg to allow tabular alignments when
# using DSL methods (e.g. FactoryGirl).
Style/SingleSpaceBeforeFirstArg:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
# Not enforcing %i() arrays, because they are too similar to %w() and don't have
# proper syntax highlighting support for differentiating between them.
Style/SymbolArray:
Enabled: false
Style/TrailingComma:
EnforcedStyleForMultiline: comma
### Rails ######################################################################
# It would be better to handle time zones properly, but since the application
# only serves customers in the UK, it doesn't hurt to disable the following two.
Rails/Date:
Enabled: false
Rails/TimeZone:
Enabled: false