forked from cisco/cisco-network-node-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
76 lines (58 loc) · 1.64 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
# Rubocop configuration
# Baseline code complexity metrics - we should try and reduce these over time
Metrics/AbcSize:
Max: 50
Metrics/ClassLength:
Max: 722
Metrics/CyclomaticComplexity:
Max: 17
# Template files have long lines before tag replacement
Metrics/LineLength:
Exclude:
- docs/*.rb
Metrics/MethodLength:
Max: 86
Metrics/ParameterLists:
Max: 9
Metrics/PerceivedComplexity:
Max: 19
#
# 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
# Permit 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
# "def foo(bar=baz)" not "def foo(bar = baz)"
Style/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space
# Make it neater to extend multi-line arrays and hashes
Style/TrailingComma:
EnforcedStyleForMultiline: comma
# Because an SnmpServer cannot be destroyed, we end most of the SnmpServer
# test cases by explicitly returning the configuration to default.
# Rubocop thinks this is a no-op but it isn't.
Lint/UselessSetterCall:
Exclude:
- 'tests/test_snmpserver.rb'