-
Notifications
You must be signed in to change notification settings - Fork 137
/
.rubocop.yml
85 lines (68 loc) · 2.08 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
80
81
82
83
84
85
# Bellow the changes to default Rubocop behavior.
# See options at:
# https://github.com/bbatsov/rubocop/tree/master/config
AllCops:
TargetRubyVersion: 3.3
NewCops: enable
# General
# Multi-line method chaining should be done with leading dots.
Layout/DotPosition:
EnforcedStyle: trailing
SupportedStyles:
- leading
- trailing
# Enabling
# --------
Style/CollectionMethods:
Description: 'Preferred collection methods.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size'
Enabled: true
Style/StringMethods:
Description: 'Checks if configured preferred methods are used over non-preferred.'
Enabled: true
# Disabling
# ---------
# Modifying
# ---------
# Check quotes usage according to lint rule below.
Style/StringLiterals:
Enabled: true
EnforcedStyle: double_quotes
# Configuration parameters: SupportedStyles.
# SupportedStyles: snake_case, camelCase
Naming/MethodName:
EnforcedStyle: snake_case
Exclude:
- 'test/**/*'
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, AutoCorrectEncodingComment.
# SupportedStyles: when_needed, always, never
Style/Encoding:
Enabled: true
# If we fix this, it will change method signature.
# Save it for major release.
Style/OptionalArguments:
Exclude:
- 'lib/highline/list_renderer.rb'
# TemplateRenderer should never fail on method missing.
Style/MissingRespondToMissing:
Exclude:
- 'lib/highline/template_renderer.rb'
# This is a breaking change for MRI 1.9.
# Revoke when updating to MRI 2.0 as minimum.
# Cop supports --auto-correct.
# Configuration parameters: MinSize, SupportedStyles.
# SupportedStyles: percent, brackets
Style/SymbolArray:
EnforcedStyle: brackets
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
Layout/HeredocIndentation:
Exclude:
- 'examples/page_and_wrap.rb'
- 'highline.gemspec'
- 'test/acceptance/acceptance.rb'
# Cop supports --auto-correct.
Lint/ScriptPermission:
Enabled: false