feat: Disallow using legacy params with rich params (#5974)

* feat: Disallow using legacy params with rich params

* Fix

* nolint
This commit is contained in:
Marcin Tojek
2023-02-02 16:44:57 +01:00
committed by GitHub
parent 01ebfdc9dd
commit 271d68c862
5 changed files with 46 additions and 14 deletions

View File

@ -260,7 +260,7 @@ func assertGoCommentFirst(t *testing.T, comment SwaggerComment) {
text := strings.TrimSpace(line.Text)
if inSwaggerBlock {
if !strings.HasPrefix(text, "// @") {
if !strings.HasPrefix(text, "// @") && !strings.HasPrefix(text, "// nolint:") {
assert.Fail(t, "Go function comment must be placed before swagger comments")
return
}