-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rubocop.yml
160 lines (148 loc) · 3.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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
inherit_mode:
merge:
- Exclude
- Include
require:
- rubocop-md
- rubocop-performance
- rubocop-rails
- rubocop-rake
- rubocop-rspec
- rubocop-rspec_rails
- rubocop-thread_safety
- rubocop-yard
AllCops:
TargetRubyVersion: 3.2
EnabledByDefault: true
Exclude:
- "spec/dummy/**/*"
# Gem comments are unnecessary for this project.
Bundler/GemComment:
Enabled: false
# Version specifications in `Gemfile`s are unnecessary for this project.
Bundler/GemVersion:
Enabled: false
Layout/ExtraSpacing:
AllowBeforeTrailingComments: true
Layout/LeadingCommentSpace:
AllowRBSInlineAnnotation: true
Layout/LineLength:
AllowedPatterns:
- "'.{50,}'"
- '".{50,}"'
- "\\.and_wrap_original\\b"
- "^\\s*it\\b.+\\bdo$"
# I want to use single line block chains.
Layout/SingleLineBlockChain:
Enabled: false
# Forcing full qualifying constants isn’t worth doing.
Lint/ConstantResolution:
Enabled: false
Lint/NumberConversion:
Exclude:
- "db/migrate/20230220123456_create_tanshuku_urls.rb"
Lint/RedundantCopDisableDirective:
AutoCorrect: false
Lint/UnusedBlockArgument:
AutoCorrect: false
Lint/UnusedMethodArgument:
AutoCorrect: false
Metrics/AbcSize:
Max: 32
Metrics/MethodLength:
Max: 30
Rails/DynamicFindBy:
AllowedMethods:
- find_by_url
Rails/Output:
Exclude:
- "lib/tasks/*"
Rails/Present:
Exclude:
- "Gemfile"
# Comments are unnecessary.
Rails/SchemaComment:
Enabled: false
# I want to use "if" and so on for contexts.
RSpec/ContextWording:
Enabled: false
RSpec/DescribeClass:
Exclude:
- "**/spec/config/**/*"
# Forcing using `described_class` isn’t readable.
RSpec/DescribedClass:
Enabled: false
RSpec/EmptyHook:
AutoCorrect: false
# Long examples are sometimes rational.
RSpec/ExampleLength:
Enabled: false
# Expectations in hooks are sometimes rational.
RSpec/ExpectInHook:
Enabled: false
# Indexed `let` is sometimes rational, e.g., when arbitrary multiple records are needed.
RSpec/IndexedLet:
Enabled: false
RSpec/MultipleExpectations:
Max: 10
RSpec/MultipleMemoizedHelpers:
Max: 15
RSpec/NestedGroups:
Max: 10
# Some non-ASCII symbols, e.g., “, ’, and so on, can be used.
Style/AsciiComments:
Enabled: false
# Forcing explicit constant visibility isn’t worth doing.
Style/ConstantVisibility:
Enabled: false
# Copyright is unnecessary for this project.
Style/Copyright:
Enabled: false
Style/DisableCopsWithinSourceCodeDirective:
AutoCorrect: false
AllowedCops:
- Lint/DuplicateMethods
- Lint/NumberConversion
- Lint/RescueException
- Rails/ApplicationRecord
- Rails/RakeEnvironment
- Rails/TimeZone
- ThreadSafety/ClassInstanceVariable
- ThreadSafety/NewThread
Style/Documentation:
Exclude:
- "db/migrate/*"
- "lib/tasks/*"
- "tools/*"
Style/DocumentationMethod:
Exclude:
- "db/migrate/*"
- "lib/tasks/*"
- "tools/*"
Style/FrozenStringLiteralComment:
Exclude:
- "bin/*"
# Use inline comments like `array = [] #: Array[String]` for RBS/Steep.
Style/InlineComment:
Enabled: false
# Forcing parentheses of all method calls isn’t readable.
# e.g., redirect_to, raise, create_table, t.string, RSpec’s expectations, assertions, and so on
Style/MethodCallWithArgsParentheses:
Enabled: false
# Forcing `else` isn’t worth doing.
Style/MissingElse:
Enabled: false
Style/RedundantBegin:
AutoCorrect: false
# Use double quotes for consistency with Rails.
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
ThreadSafety/DirChdir:
Exclude:
- "tanshuku.gemspec"