Skip to content
Open
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
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ AllCops:
SuggestExtensions: false
Exclude:
- "vendor/**/*"
- "lib/tapioca/helpers/package_url.rb"
Include:
- "sorbet/rbi/shims/**/*.rbi"

Expand Down
11 changes: 6 additions & 5 deletions lib/tapioca/gem/listeners/source_location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ def add_source_location_comment(node, file, line)
# we can clear the gem version if the gem is the same one we are processing
version = "" if gem == @pipeline.gem

uri = SourceURI.build(
gem_name: gem.name,
gem_version: version,
path: path.to_s,
line_number: line.to_s,
uri = Tapioca::Helpers::PackageURL.new(
type: "gem",
name: gem.name,
version: version,
subpath: "#{path}:#{line}",
)

node.comments << RBI::Comment.new("") if node.comments.any?
node.comments << RBI::Comment.new(uri.to_s)
rescue URI::InvalidComponentError, URI::InvalidURIError
Expand Down
Loading
Loading