-
Notifications
You must be signed in to change notification settings - Fork 2
/
.rubocop.yml
105 lines (81 loc) · 2.35 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Enable all new cops.
AllCops:
NewCops: enable
# Allow setting of date in gemspec.
Gemspec/DeprecatedAttributeAssignment:
Enabled: false
# Do not require multi-factor authentication for RubyGems.
Gemspec/RequireMFA:
Enabled: false
# Align keys, separators, and values of multi-line hashes.
Layout/HashAlignment:
EnforcedColonStyle: table
EnforcedHashRocketStyle: table
# Allow extra blank lines.
Layout/EmptyLines:
Enabled: false
# Allow extra empty line at block body beginning.
Layout/EmptyLinesAroundBlockBody:
Enabled: false
# Allow extra empty line at class body beginning.
Layout/EmptyLinesAroundClassBody:
EnforcedStyle: beginning_only
Exclude:
- "lib/pnm/image.rb"
# Allow extra empty line at module body beginning.
Layout/EmptyLinesAroundModuleBody:
Enabled: false
# Allow extra spacing.
Layout/ExtraSpacing:
Enabled: false
# No space before block parameters.
Layout/SpaceInsideBlockBraces:
SpaceBeforeBlockParameters: false
# Allow extra spacing in array literals in test files.
Layout/SpaceInsideArrayLiteralBrackets:
Exclude:
- "test/test_*.rb"
# Disable metrics.
Metrics:
Enabled: false
# Use %Q() instead of %() for string percent literals.
Style/BarePercentLiterals:
EnforcedStyle: percent_q
# Do not enforce a specific string formatting method.
Style/FormatString:
Enabled: false
# Allow unnamed format string tokens.
Style/FormatStringToken:
Enabled: false
# Allow missing frozen string literal comment in Gemfile.
Style/FrozenStringLiteralComment:
Exclude:
- Gemfile
# Use Ruby 1.9 hash syntax.
# Do not allow the hash value shorthand syntax of Ruby 3.1.
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
EnforcedShorthandSyntax: never
# Allow parallel assignment.
Style/ParallelAssignment:
Enabled: false
# Allow redundant assignment before returning.
# (Used here for intention revealing variables.)
Style/RedundantAssignment:
Exclude:
- lib/pnm/converter.rb
# Allow %r{} for regular expressions in test files.
# (To avoid ambiguous regexp literal warnings.)
Style/RegexpLiteral:
Exclude:
- "test/test_*.rb"
# Use double quotes for string literals.
Style/StringLiterals:
EnforcedStyle: double_quotes
# Allow expressions like '2 * x'.
Style/YodaExpression:
Enabled: false
##### Settings for older Ruby versions #####
# For older Ruby versions.
Gemspec/RequiredRubyVersion:
Enabled: false