-
Notifications
You must be signed in to change notification settings - Fork 19
/
.rubocop.yml
executable file
·89 lines (70 loc) · 1.76 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
AllCops:
Include:
- attributes/*.rb
- docs/*.rb
- libraries/*.rb
- recipes/*.rb
- spec/**/*.rb
Exclude:
- metadata.rb
- files/**/*
- vendor/**/*
# Baseline code complexity metrics - we should try and reduce these over time
Metrics/AbcSize:
Max: 157
Metrics/ClassLength:
Max: 132
Metrics/CyclomaticComplexity:
Max: 31
Metrics/LineLength:
Max: 118
Metrics/MethodLength:
Max: 110
Metrics/PerceivedComplexity:
Max: 32
#
# Team preferences different from Rubocop defaults:
#
# We like table alignment for readability
Style/AlignHash:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
# Template files have wildcard strings in class names
Style/ClassAndModuleCamelCase:
Exclude:
- docs/*.rb
# Use is_a? and kind_of? interchangeably
Style/ClassCheck:
Enabled: false
# Template files have atypical file names on purpose
Style/FileName:
Exclude:
- docs/*.rb
# As a team we like 'sprintf' rather than 'format'
Style/FormatString:
EnforcedStyle: sprintf
# Mixed keys are ugly. Use one or the other as needed
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
# Template files have wildcard strings in method names
Style/MethodName:
Exclude:
- docs/*.rb
# Recipes shouldn't use underscores in numeric literals
Style/NumericLiterals:
Exclude:
- recipes/*.rb
# "def foo(bar=baz)" not "def foo(bar = baz)"
Style/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space
# Let us use table-style formatting in our recipes
Style/SingleSpaceBeforeFirstArg:
Exclude:
- recipes/*.rb
# Make it neater to extend multi-line arrays and hashes
Style/TrailingComma:
EnforcedStyleForMultiline: comma
# Template files have wildcard strings in variable names
Style/VariableName:
Exclude:
- docs/*.rb