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

Handle case of empty GOROOT #1798

Merged
merged 1 commit into from Apr 21, 2024

Conversation

evan-goode
Copy link
Contributor

Describe the PR

In some situations, such as when using the go-swag Nix package, runtime.GOROOT() will be empty, and RangeFiles will skip all source paths since technically, all paths are prefixed with the empty string.

See also NixOS/nixpkgs#224701

May resolve some cases of #1622.

Relation issue
NixOS/nixpkgs#224701
#1622

Additional context

In some situations, such as when using the go-swag Nix package, runtime.GOROOT() will be empty, and RangeFiles will skip all source paths since technically, all paths are prefixed with the empty string.

See also NixOS/nixpkgs#224701

May resolve some cases of swaggo#1622.
Copy link

codecov bot commented Apr 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.70%. Comparing base (91624ad) to head (4aab213).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1798      +/-   ##
==========================================
- Coverage   83.40%   81.70%   -1.71%     
==========================================
  Files          16       17       +1     
  Lines        3881     3962      +81     
==========================================
  Hits         3237     3237              
- Misses        545      626      +81     
  Partials       99       99              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ubogdan ubogdan merged commit 4c2f8dd into swaggo:master Apr 21, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants