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

fix: Generics not detected if name does not contain a pkg name #1328

Merged
merged 1 commit into from
Sep 16, 2022

Conversation

FabianMartin
Copy link
Contributor

@FabianMartin FabianMartin commented Sep 15, 2022

Describe the PR
Fixes bug described in #1319

  • Generic detection moved to own method
  • prepend pkg name if not provided

Relation issue
#1319

Additional context
Tested with Go 1.15, 1.16, 1.17, 1.18 and 1.19.

- Generic detection moved to own method
- prepend pkg path if not provided

refs swaggo#1319
@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Base: 95.63% // Head: 95.64% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (2eb60a0) compared to base (b8f53da).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 2eb60a0 differs from pull request most recent head cf009bd. Consider uploading reports for the commit cf009bd to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1328   +/-   ##
=======================================
  Coverage   95.63%   95.64%           
=======================================
  Files          14       14           
  Lines        2865     2871    +6     
=======================================
+ Hits         2740     2746    +6     
  Misses         70       70           
  Partials       55       55           
Impacted Files Coverage Δ
packages.go 90.94% <100.00%> (+0.24%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@FabianMartin FabianMartin changed the title fix: Generics not detected if name does not contain a pkg path fix: Generics not detected if name does not contain a pkg name Sep 15, 2022
@ghoshabhi
Copy link

@ubogdan if you can please review this PR and include this fix in the 1.8.6 release, i would be extremely grateful :)

Copy link
Contributor

@ubogdan ubogdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ubogdan ubogdan merged commit 2cd7ab5 into swaggo:master Sep 16, 2022
@ubogdan
Copy link
Contributor

ubogdan commented Sep 16, 2022

@FabianMartin Thanks for your contribution.

@FabianMartin FabianMartin deleted the generic-pkg-path branch September 16, 2022 13:46
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.

3 participants