Skip to content

codescan: use TypeSpec.Doc over GenDecl.Doc #2659

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

Merged
merged 1 commit into from
Nov 27, 2021

Conversation

crazytyper
Copy link

This merge requests improves the command generate spec as follows:

type (
   // Do not ignore this comment block
  Foo struct {
  }
)
// Do not use this comment block for type Foo and Bar
type (
   // Use this comment block for type Foo instead
  Foo struct {
  }
  // Use this comment block for type Bar instead
  Bar struct {
  }
)

@crazytyper crazytyper force-pushed the fix-use-typespec-comments branch from 34b753a to 33967ed Compare November 13, 2021 10:26
@codecov
Copy link

codecov bot commented Nov 13, 2021

Codecov Report

Merging #2659 (8757820) into master (92bf85b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2659   +/-   ##
=======================================
  Coverage   82.96%   82.96%           
=======================================
  Files          54       54           
  Lines        9515     9521    +6     
=======================================
+ Hits         7894     7899    +5     
- Misses       1110     1111    +1     
  Partials      511      511           
Impacted Files Coverage Δ
codescan/application.go 72.63% <100.00%> (+0.43%) ⬆️
generator/structs.go 83.79% <0.00%> (-0.56%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92bf85b...8757820. Read the comment docs.

Copy link
Member

@casualjim casualjim left a comment

Choose a reason for hiding this comment

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

Can you add a test?

Signed-off-by: Crazy Typer <github.crazy.typer@gmail.com>
@crazytyper crazytyper force-pushed the fix-use-typespec-comments branch from 33967ed to 8757820 Compare November 15, 2021 07:29
@crazytyper
Copy link
Author

Can you add a test?

I have modified existing tests to fail without the proposed changes.

@crazytyper crazytyper requested a review from casualjim November 16, 2021 06:41
@casualjim casualjim merged commit f37e218 into go-swagger:master Nov 27, 2021
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.

2 participants