-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
.rubocop.yml
70 lines (57 loc) · 1.88 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
inherit_from: .rubocop_todo.yml
inherit_mode:
merge:
- Exclude
require:
- rubocop-capybara
- rubocop-packaging
- rubocop-rake
- rubocop-rspec
AllCops:
NewCops: disable
# Keep this inline with the lowest ruby version in the gemspec
TargetRubyVersion: 3.0
# Display cop name / style guide references
DisplayCopNames: true
DisplayStyleGuide: true
Exclude:
- bin/*
- tmp/**/*
- vendor/**/*
- temp_app/**/*
# A line length of 200 covers most violations in the repo while still being a more up to date length given today's screen sizes
Layout/LineLength:
Max: 200
# Reviewed: Formatters put trailing spaces after things like 'Feature: '
# In pretty_spec.rb & progress_spec.rb offences look false as the trailing spaces are in fact multiline string literals
Layout/TrailingWhitespace:
Exclude:
- spec/cucumber/formatter/pretty_spec.rb
- spec/cucumber/formatter/progress_spec.rb
# Rubocop doesn't like method names in other languages but as Cucumber supports multiple languages, this cop needs to be disabled
Naming/AsciiIdentifiers:
Enabled: false
# These directories (And associated files), are named according to the CCK convention which is kebab-case
Naming/FileName:
Exclude:
- compatibility/features/**/*
# For the most part, the project is solid on naming. There are though, a few cases where the cop doesn't need to catch
Naming/MethodName:
Exclude:
- examples/i18n/ar/lib/calculator.rb
- examples/i18n/he/lib/calculator.rb
- lib/cucumber/glue/dsl.rb
RSpec/ExampleLength:
CountAsOne: ['array', 'hash', 'heredoc']
# Stylistic preference for cucumber
RSpec/MessageSpies:
EnforcedStyle: receive
# Stylistic preference for cucumber
Style/Documentation:
Enabled: false
Style/FormatStringToken:
EnforcedStyle: annotated
# Stylistic preference for cucumber
Style/RegexpLiteral:
EnforcedStyle: slashes
AllowInnerSlashes: true