`swag init` breaks `make critic`
p3nj opened this issue · 2 comments
p3nj commented
Required check list:
- I'm gonna mark the checkboxes like this.
- I didn't find in the repository's issues section similar bug.
- I understand, this is Open Source and not-for-profit product.
- This is not about third-party project, framework, package or technology.
My environment:
- OS (
uname -a
): Darwin Maccie.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64 - Golang (
go version
): go version go1.18.2 darwin/arm64
Describe the bug:
swag init
will break make critic
- first time
$ make critic
have no error output - use
$ swag init
regenerate swag documents, includedocs.go
- run
$ make critic
again. - See output
./docs/docs.go:2:1: codegenComment: comment should match `Code generated .* DO NOT EDIT.` regexp
make: *** [critic] Error 1
Expected behavior:
$ make critic
should exit without issue after $ swag init
Additional context:
$ swag init
also won't read the @BasePath
defines inside main.go.
Will have to manually add /api
to all API endpoints in order to make Swagger UI work.
welcome commented
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template!
p3nj commented
I realised that this issue was raised by go-critic. moving there.