-
-
Notifications
You must be signed in to change notification settings - Fork 151
Expand file tree
/
Copy path.rubocop.yml
More file actions
96 lines (75 loc) · 1.84 KB
/
Copy path.rubocop.yml
File metadata and controls
96 lines (75 loc) · 1.84 KB
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
inherit_from: .rubocop_todo.yml
inherit_gem:
rubocop-rails-omakase: rubocop.yml
AllCops:
# Match gemspec required_ruby_version (>= 3.3).
TargetRubyVersion: 3.3
Exclude:
- 'bin/*'
- 'config/locales/*'
- 'gemfiles/*'
- 'lib/tasks/*'
- 'vendor/bundle/**/*'
NewCops: enable
plugins:
- rubocop-performance
- rubocop-rspec
# ==============================================================================
# Cops
# Style cops
Style/Documentation:
Enabled: false
# Metrics cops
Metrics/AbcSize:
Severity: warning
Metrics/MethodLength:
Max: 15
Metrics/BlockLength:
Exclude:
- test/**/*
- spec/**/*
# ==============================================================================
# RSpec cops
#
# Re-enabled where the suite is clean or cheap to keep clean.
# Remaining disables are intentional for this suite's shape / DSL.
RSpec/DescribeClass:
Exclude:
- spec/**/integration/**/*
- spec/integration/**/*
# Suite boot banner (not an example)
RSpec/Output:
Exclude:
- spec/rails_helper.rb
# Comparison matrices nest deeply; default Max 3 is too low for this suite
RSpec/NestedGroups:
Max: 7
RSpec/MultipleExpectations:
Enabled: false
RSpec/ExampleLength:
Max: 15
CountAsOne:
- array
- hash
RSpec/MultipleMemoizedHelpers:
Enabled: false
# Nested contexts continue with and/which/that/but (see .cursor/rules/spec.mdc)
RSpec/ContextWording:
Prefixes:
- when
- with
- without
- and
- which
- that
- but
# Custom helpers wrap expect; treat is_expected_* as expectations
RSpec/NoExpectationExample:
AllowedPatterns:
- ^is_expected_
# Flat layout: spec/validators/size_validator_spec.rb (not nested by module path)
RSpec/SpecFilePathFormat:
Enabled: false
# file_1 / file_2 style lets are clearer than renaming for this suite
RSpec/IndexedLet:
Enabled: false