Skip to content
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

(maint) Fix rubocop lint warnings #374

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/puppet-strings/describe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def self.list_one(object)
targetlength = 48
shortento = targetlength - 4
contentstring = object[:docstring][:text]
end_of_line = contentstring.index("\n") # "." gives closer results to old describeb, but breaks for '.k5login'
end_of_line = contentstring.index("\n") # "." gives closer results to old describeb, but breaks for '.k5login'
contentstring = contentstring[0..end_of_line] unless end_of_line.nil?
contentstring = "#{contentstring[0..shortento]} ..." if contentstring.length > targetlength

Expand Down
2 changes: 1 addition & 1 deletion lib/puppet-strings/yard/code_objects/function.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class PuppetStrings::Yard::CodeObjects::Functions < PuppetStrings::Yard::CodeObj
# @param [Symbol] type The function type to get the group for.
# @return Returns the singleton instance of the group.
def self.instance(type)
super("puppet_functions_#{type}".to_sym)
super(:"puppet_functions_#{type}")
end

# Gets the display name of the group.
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet-strings/yard/code_objects/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class PuppetStrings::Yard::CodeObjects::Providers < PuppetStrings::Yard::CodeObj
# @param [String] type The resource type name for the provider.
# @return Returns the singleton instance of the group.
def self.instance(type)
super("puppet_providers_#{type}".to_sym)
super(:"puppet_providers_#{type}")
end

# Gets the display name of the group.
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet-strings/yard/code_objects/type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def parameters
# render-time. For now, this should re-resolve on every call.
# may be able to memoize this
def providers
providers = YARD::Registry.all("puppet_providers_#{name}".to_sym)
providers = YARD::Registry.all(:"puppet_providers_#{name}")
return providers if providers.empty?

providers.first.children
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet-strings/yard/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def self.github_to_yard_links(data)
# @return [Array] Returns an array of tag hashes.
def self.tags_to_hashes(tags)
# Skip over the API tags that are public
tags.select { |t| (t.tag_name != 'api' || t.text != 'public') }.map do |t|
tags.select { |t| t.tag_name != 'api' || t.text != 'public' }.map do |t|
next t.to_hash if t.respond_to?(:to_hash)

tag = { tag_name: t.tag_name }
Expand Down