forked from jnunemaker/happymapper
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy path.rubocop.yml
77 lines (60 loc) · 1.72 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
inherit_from: .rubocop_todo.yml
inherit_mode:
merge:
- Exclude
require:
- rubocop-packaging
- rubocop-performance
- rubocop-rspec
AllCops:
NewCops: enable
TargetRubyVersion: 3.0
# Put development dependencies in the gemspec so rubygems.org knows about them
Gemspec/DevelopmentDependencies:
EnforcedStyle: gemspec
# Spaces in strings with line continuations go at the beginning of the line.
Layout/LineContinuationLeadingSpace:
EnforcedStyle: leading
# Be lenient with line length
Layout/LineLength:
Max: 92
# Assume the programmer knows how bracketed block syntax works
Lint/AmbiguousBlockAssociation:
Enabled: false
# Assume the programmer knows precendence rules
Lint/AmbiguousOperatorPrecedence:
Enabled: false
Metrics/BlockLength:
Exclude:
- 'spec/**/*_spec.rb' # Blocks can be any length in spec files
- '*.gemspec' # Gem spec blocks can be any size
# TODO: Update code so these maxima can be lowered
Metrics/ParameterLists:
Max: 6
MaxOptionalParameters: 4
Naming/PredicateName:
AllowedMethods:
- 'has_one'
- 'has_many'
- 'has_xml_content'
# regression specs do not describe classes
RSpec/DescribeClass:
Exclude:
- 'spec/regressions/*.rb'
RSpec/SpecFilePathFormat:
CustomTransform:
HappyMapper: 'happymapper'
# Do not commit to use of interpolation
Style/StringLiterals:
EnforcedStyle: double_quotes
# Make quoting outside and inside interpolation consistent
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
# Use older RuboCop default
Style/PercentLiteralDelimiters:
PreferredDelimiters:
'%w': ()
# Configuration parameters: AutoCorrect, EnforcedStyle.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
EnforcedStyle: comparison