forked from openactive/models-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
98 lines (91 loc) · 2.21 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
require:
- rubocop-rspec
Layout/SpaceInsideHashLiteralBraces:
Enabled: false
Lint/ScriptPermission:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/MethodLength:
Enabled: true
Max: 20
Exclude:
- 'db/**/*.rb'
Bundler/OrderedGems:
Enabled: false
RSpec/ExampleWording:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
Style/Documentation:
Enabled: false
Style/EmptyCaseCondition:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/StringLiterals:
Enabled: false
# check this against SW styleguide
Style/TrailingCommaInArrayLiteral:
Enabled: false
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArguments:
Enabled: true
EnforcedStyleForMultiline: comma
# check this against SW styleguide
Style/TrailingCommaInHashLiteral:
Enabled: false
EnforcedStyleForMultiline: comma
Style/SymbolArray:
EnforcedStyle: brackets
Style/WordArray:
EnforcedStyle: brackets
RSpec/ExampleLength:
Max: 15
Exclude:
- 'spec/features/**/*.rb' # feature specs are just naturally long
Style/ClassAndModuleChildren:
AutoCorrect: true
RSpec/NestedGroups:
Max: 5
Style/AsciiComments:
Enabled: false
Naming/MethodParameterName:
AllowedNames:
- as
- id
Layout/LineLength:
Enabled: true
Max: 120
Exclude:
- 'lib/openactive/models/**/*.rb'
- 'lib/openactive/enums/**/*.rb'
- 'openactive.gemspec'
Naming/PredicateName:
Exclude:
- 'lib/openactive/models/**/*.rb'
- 'lib/openactive/enums/**/*.rb'
Style/TrivialAccessors:
Exclude:
- 'lib/openactive/models/**/*.rb'
- 'lib/openactive/enums/**/*.rb'
Metrics/ClassLength:
Exclude:
- 'lib/openactive/models/**/*.rb'
- 'lib/openactive/enums/**/*.rb'
Layout/SpaceInsideArrayLiteralBrackets:
Exclude:
- 'lib/openactive/models/**/*.rb'
# Specs aren't being used in an entirely typical way, so these rules clash
RSpec/DescribeClass:
Enabled: false
RSpec/FilePath:
Enabled: false
# While these do great at indicating code smell, the code is inheritantly complicated and would need major refactoring
# (which would further obfuscate what it's doing!)
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false