From 4fb24ab145ad75051092e4e76f720f533ad7bb71 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 13 Jan 2020 20:06:42 +0100 Subject: make lint: include pkg/tracing Signed-off-by: Valentin Rothberg --- .golangci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to '.golangci.yml') diff --git a/.golangci.yml b/.golangci.yml index 7fbc3d439..948d2f479 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -8,12 +8,10 @@ run: deadline: 5m skip-dirs-use-default: true skip-dirs: - - dependencies - contrib - - test/e2e + - dependencies + - test - docs - - test/ - - tracing skip-files: - iopodman.go linters: -- cgit v1.2.3-54-g00ecf From 4533dea70e1ffbf395d31efcbab4989705fa4d8c Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 13 Jan 2020 20:11:00 +0100 Subject: make lint: include docs/ Signed-off-by: Valentin Rothberg --- .golangci.yml | 1 - docs/varlink/apidoc.go | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to '.golangci.yml') diff --git a/.golangci.yml b/.golangci.yml index 948d2f479..4b8850d02 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -11,7 +11,6 @@ run: - contrib - dependencies - test - - docs skip-files: - iopodman.go linters: diff --git a/docs/varlink/apidoc.go b/docs/varlink/apidoc.go index 884ce54fe..87304de15 100644 --- a/docs/varlink/apidoc.go +++ b/docs/varlink/apidoc.go @@ -181,7 +181,7 @@ func generateIndex(methods []funcDescriber, types []typeDescriber, errors []err, } for _, outArg := range method.returnParams { - outArgs = append(outArgs, fmt.Sprintf("%s", outArg.paramKind)) + outArgs = append(outArgs, outArg.paramKind) } b.WriteString(fmt.Sprintf("\n[func %s(%s) %s](#%s)\n", method.Name, strings.Join(inArgs, ", "), strings.Join(outArgs, ", "), method.Name)) @@ -272,5 +272,8 @@ func main() { out = generateTypeDescriptions(types, out) out.WriteString("## Errors\n") out = generateErrorDescriptions(errors, out) - ioutil.WriteFile(mdFile, out.Bytes(), 0755) + if err := ioutil.WriteFile(mdFile, out.Bytes(), 0755); err != nil { + fmt.Fprintf(os.Stderr, "Error writing file: %v\n", err) + os.Exit(1) + } } -- cgit v1.2.3-54-g00ecf From a1028697465029f3e7b100de843eb7e5e2948246 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 13 Jan 2020 20:13:00 +0100 Subject: .golangci.yml: move swagger.go from Makefile Signed-off-by: Valentin Rothberg --- .golangci.yml | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to '.golangci.yml') diff --git a/.golangci.yml b/.golangci.yml index 4b8850d02..dda1cc7ec 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -13,6 +13,7 @@ run: - test skip-files: - iopodman.go + - swagger.go linters: enable-all: true disable: diff --git a/Makefile b/Makefile index 5d3405387..bfcbce1e1 100644 --- a/Makefile +++ b/Makefile @@ -151,7 +151,7 @@ endif lint: golangci-lint golangci-lint: .gopathok varlink_generate .install.golangci-lint - $(GOBIN)/golangci-lint run --tests=false --skip-files swagger.go + $(GOBIN)/golangci-lint run --tests=false gofmt: ## Verify the source code gofmt find . -name '*.go' ! -path './vendor/*' -exec gofmt -s -w {} \+ -- cgit v1.2.3-54-g00ecf