From ba26c763c540b7ff16986fab59ca656aa6806ba7 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Mon, 30 Mar 2020 14:01:29 -0600 Subject: swagger-check: new CI tool to cross-check swagger New script cross-references r.Handle() and r.HandleFunc() calls against the preceding '// swagger:operation' comments, and exits failure (with descriptive error messages) if any comments do not match the code. This script should not be necessary: the swagger comments should be autogenerated from the source code. Signed-off-by: Ed Santiago --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9121fae1f..e22d74f5d 100644 --- a/Makefile +++ b/Makefile @@ -397,6 +397,10 @@ install-podman-remote-%-docs: podman-remote docs $(MANPAGES) man-page-check: hack/man-page-checker +.PHONY: swagger-check +swagger-check: + hack/swagger-check + .PHONY: codespell codespell: codespell -S bin,vendor,.git,go.sum,changelog.txt,seccomp.json,.cirrus.yml,"*.xz,*.gz,*.tar,*.tgz,bin2img,*ico,*.png,*.1,*.5,copyimg,*.orig,apidoc.go" -L uint,iff,od,seeked,splitted,marge,ERRO,hist -w @@ -624,7 +628,7 @@ validate.completions: completions/bash/podman if [ -x /bin/zsh ]; then /bin/zsh completions/zsh/_podman; fi .PHONY: validate -validate: gofmt lint .gitvalidation validate.completions man-page-check +validate: gofmt lint .gitvalidation validate.completions man-page-check swagger-check .PHONY: build-all-new-commits build-all-new-commits: -- cgit v1.2.3-54-g00ecf