-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
.rubocop.yml
71 lines (57 loc) · 1.57 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
# This allows us to merge arrays for Exclude rules on AllCops or a specific cop
inherit_mode:
merge:
- Exclude
require:
- rubocop-performance
- rubocop-rspec
AllCops:
TargetRubyVersion: 2.7
NewCops: enable
# Document gem dependencies in the gemspec
Gemspec/DevelopmentDependencies:
Enabled: false
# Don't use MFA
Gemspec/RequireMFA:
Enabled: false
# This allows a longer LineLength and ignores cuke definitions
Layout/LineLength:
Max: 140
AllowedPatterns:
- ^Given
- ^When
- ^Then
# These scenarios need empty blocks to trigger an error for not permitting blocks
Lint/EmptyBlock:
Exclude:
- spec/site_prism/element_spec.rb
- spec/site_prism/elements_spec.rb
# Don't count long arrays/hashes/heredocs as long methods
Metrics/MethodLength:
CountAsOne: ['array', 'hash', 'heredoc']
# We are a DSL, so we occasionally need to use `.set_` prefixes on our DSL names
Naming/AccessorMethodName:
Enabled: false
# This is a single standardised transform
RSpec/SpecFilePathFormat:
CustomTransform:
RSpecMatchers: rspec_matchers
# Stylistic preference
RSpec/MessageSpies:
EnforcedStyle: receive
# Test the RSpec matcher is correctly calling the `has_no` method
RSpec/MultipleExpectations:
Exclude:
- spec/site_prism/element_spec.rb
# Don't document any testing code
Style/Documentation:
Exclude:
- features/**/*
# Stylistic preference
Style/RegexpLiteral:
EnforcedStyle: slashes
AllowInnerSlashes: true
# False negative: https://github.com/rubocop/rubocop/issues/12423
Style/YodaCondition:
Exclude:
- lib/site_prism/dsl/locators.rb