Skip to content

Commit

Permalink
Rubocop tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfairh committed Sep 18, 2021
1 parent 7dc2426 commit 5a2b60a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/jazzy/sourcekitten.rb
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ def self.make_swift_declaration(doc, declaration)
def self.swift_async?(fully_annotated_decl)
document = REXML::Document.new(fully_annotated_decl)
!document.elements['/*/syntaxtype.keyword[text()="async"]'].nil?
rescue
rescue StandardError
nil
end

Expand Down
2 changes: 1 addition & 1 deletion lib/jazzy/symbol_graph/sym_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def inherits_clause

# approximately...
def async?
symbol.declaration =~ /async[^\)]*$/
symbol.declaration =~ /\basync\b[^)]*$/
end

def full_declaration
Expand Down
1 change: 1 addition & 0 deletions lib/jazzy/symbol_graph/symbol.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def adjust_kind_for_declaration(kind, keywords)
return 'swift.actor'
end
return kind unless keywords.member?('static')

kind.gsub(/type/, 'static')
end

Expand Down

0 comments on commit 5a2b60a

Please sign in to comment.