-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand single-letter variable names for better readability #1313
base: master
Are you sure you want to change the base?
Conversation
Deploying rdoc with
|
Latest commit: |
0b054ff
|
Status: | ✅ Deploy successful! |
Preview URL: | https://1561ea3c.rdoc-6cd.pages.dev |
Branch Preview URL: | https://expand-variable-names.rdoc-6cd.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -74,17 +74,17 @@ def self.alias_extension(old_ext, new_ext) | |||
def self.binary?(file) | |||
return false if file =~ /\.(rdoc|txt)$/ | |||
|
|||
s = File.read(file, 1024) or return false | |||
string = File.read(file, 1024) or return false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
head
or something may be better.
attributes.each do |attr| | ||
a = RDoc::Attr.new(@container, attr, rw, processed_comment, singleton: @singleton) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attributes.each do |name|
attr = RDoc::Attr.new(@container, name, ...)
or
attributes.each do |attr_name|
attr = RDoc::Attr.new(@container, attr_name, ...)
may be better.
handle_modifier_directive(a, line_no) | ||
@container.add_attribute(a) if should_document?(a) | ||
a.visibility = visibility # should set after adding to container | ||
attr_obj = RDoc::Attr.new(nil, symbol.to_s, rw, comment, singleton: @singleton) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attr
may be better.
ie.line = line_no | ||
ie.comment = comment | ||
record_location(ie) | ||
include_extend_obj = @container.add(rdoc_class, name, '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may be able to remote _obj
suffix here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Thanks!
No description provided.