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 govet error #336

Merged
merged 5 commits into from
Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ lint:
fi

for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done;
go vet
Copy link
Member

@easonlin404 easonlin404 Mar 21, 2019

Choose a reason for hiding this comment

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

maybe can add new .PHONY:vet like:

.PHONY: vet
vet:
 ($GOVET) $(PACKAGES)

Copy link
Member

@easonlin404 easonlin404 Mar 21, 2019

Choose a reason for hiding this comment

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

and add make vet at travis script phase:

swag/.travis.yml

Lines 19 to 23 in 889705a

script:
- make fmt-check
- make lint
- make build
- make test

Copy link
Member Author

Choose a reason for hiding this comment

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

ok


.PHONY: fmt
fmt:
Expand Down
2 changes: 1 addition & 1 deletion operation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ func TestParseParamCommentByEnums(t *testing.T) {
assert.Equal(t, expected, string(b))
}

func TestlParseParamCommentByMaxLength(t *testing.T) {
func TestParseParamCommentByMaxLength(t *testing.T) {
comment := `@Param some_id query string true "Some ID" MaxLength(10)`
operation := NewOperation()
err := operation.ParseComment(comment, nil)
Expand Down