-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
79 lines (64 loc) · 1.9 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
# This is the default configuration file. Enabling and disabling is configured
# in separate files. This file adds all other parameters apart from Enabled.
require:
- rubocop-performance
- rubocop-rake
- rubocop-rspec
inherit_from:
- enabled.yml
- disabled.yml
AllCops:
# Default formatter will be used if no -f/--format option is given.
DisplayCopNames: true
# Style guide URLs are not displayed in offense messages by default. Change
# behavior by overriding DisplayStyleGuide, or by giving the
# -S/--display-style-guide option.
DisplayStyleGuide: true
# Extra details are not displayed in offense messages by default. Change
# behavior by overriding ExtraDetails, or by giving the
# -E/--extra-details option.
ExtraDetails: true
NewCops: enable
# Additional cops that do not reference a style guide rule may be enabled by
# default. Change behavior by overriding StyleGuideCopsOnly, or by giving
# the --only-guide-cops option.
TargetRubyVersion: 3.1
Layout/LineLength:
Max: 120
Metrics/AbcSize:
# The ABC size is a calculated magnitude, so this number can be a Fixnum or
# a Float.
Max: 30
Metrics/ClassLength:
CountComments: false # count full line comments?
Max: 200
Metrics/ModuleLength:
CountComments: false # count full line comments?
Max: 200
# Avoid complex methods.
Metrics/CyclomaticComplexity:
Max: 11
Metrics/MethodLength:
CountComments: false # count full line comments?
Max: 25
Metrics/PerceivedComplexity:
Max: 11
Metrics/BlockLength:
CountComments: false
Max: 100
Exclude:
- 'Rakefile'
- '**/*.rake'
- 'spec/**/*.rb'
- 'db/**/*.rb'
RSpec/MultipleExpectations:
Max: 13
RSpec/MultipleMemoizedHelpers:
Description: Checks if example groups contain too many `let` and `subject` calls.
Enabled: true
AllowSubject: true
Max: 7
RSpec/NestedGroups:
Max: 8
Style/StringLiterals:
ConsistentQuotesInMultiline: true