Skip to content

Commit 3c5717d

Browse files
authoredApr 21, 2025··
Merge pull request #1342 from Shopify/vs-enable-method-def-parenthesis
Enable `Style/MethodDefParentheses` rule
2 parents 78521dd + 610b90b commit 3c5717d

File tree

101 files changed

+596
-585
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+596
-585
lines changed
 

‎.rubocop.yml

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ AllCops:
22
TargetRubyVersion: 3.0
33
DisabledByDefault: true
44
SuggestExtensions: false
5+
Exclude:
6+
# Exclude files that are auto generated
7+
- "lib/rdoc/rd/block_parser.rb"
8+
- "lib/rdoc/rd/inline_parser.rb"
9+
- "lib/rdoc/markdown.rb"
10+
- "lib/rdoc/markdown/literals.rb"
11+
# Exclude dependency files when installing them under vendor
12+
- "vendor/**/*"
513

614
Layout/TrailingWhitespace:
715
Enabled: true
@@ -20,3 +28,6 @@ Layout/SpaceAfterComma:
2028

2129
Lint/UnreachableCode:
2230
Enabled: true
31+
32+
Style/MethodDefParentheses:
33+
Enabled: true

‎lib/rdoc/code_object.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def force_documentation=(value)
236236
#
237237
# Set to +nil+ to clear RDoc's cached value
238238

239-
def full_name= full_name
239+
def full_name=(full_name)
240240
@full_name = full_name
241241
end
242242

@@ -316,7 +316,7 @@ def parent_name
316316
##
317317
# Records the RDoc::TopLevel (file) where this code object was defined
318318

319-
def record_location top_level
319+
def record_location(top_level)
320320
@ignored = false
321321
@suppressed = false
322322
@file = top_level
@@ -358,7 +358,7 @@ def stop_doc
358358
##
359359
# Sets the +store+ that contains this CodeObject
360360

361-
def store= store
361+
def store=(store)
362362
@store = store
363363

364364
return unless @track_visibility

0 commit comments

Comments
 (0)
Please sign in to comment.