Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
32 changes: 0 additions & 32 deletions .golangci.yml

This file was deleted.

4 changes: 1 addition & 3 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ The following make targets are relevant for any work involving the Go packages.

### Linting

The included Go source code is being examined for any linting violations not included in the standard Go compiler.
Linting is done using [golangci-lint][golangci-lint].
The included Go source code is being examined for any linting violations by the standard Go compiler.

Invocation:

Expand Down Expand Up @@ -106,6 +105,5 @@ make img/media-types.png
```

[docker]: https://www.docker.com/
[golangci-lint]: https://github.com/golangci/golangci-lint
[graphviz]: https://www.graphviz.org/
[jq]: https://stedolan.github.io/jq/
20 changes: 5 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ check-license: ## check license headers in source files
lint: lint-go lint-md ## Run all linters

.PHONY: lint-go
lint-go: .install.lint ## lint check of Go files using golangci-lint
@echo "checking Go lint"
@GO111MODULE=on $(GOPATH)/bin/golangci-lint run
@[ "$$BUILD_SPEC_MODULE_ONLY" = true ] || { cd schema && GO111MODULE=on $(GOPATH)/bin/golangci-lint run; }
lint-go: ## run various checks on the Go files
test -z "$$(go fmt ./...)"
go vet ./...
[ "$$BUILD_SPEC_MODULE_ONLY" = true ] || ( cd schema && test -z "$$(go fmt ./...)" && go vet ./... )

.PHONY: lint-md
lint-md: ## Run linting for markdown
Expand All @@ -98,7 +98,7 @@ lint-md: ## Run linting for markdown
.PHONY: test
test: ## run the unit tests
go test -race -cover ./...
[ "$$BUILD_SPEC_MODULE_ONLY" = true ] || { cd schema && go test -race -cover ./...; }
[ "$$BUILD_SPEC_MODULE_ONLY" = true ] || ( cd schema && go test -race -cover ./... )

img/%.png: img/%.dot ## generate PNG from dot file
dot -Tpng $^ > $@
Expand All @@ -116,16 +116,6 @@ endif
.PHONY: .install.tools
install.tools: $(TOOLS:%=.install.%)

.PHONY: .install.lint
.install.lint:
case "$$(go env GOVERSION)" in \
go1.18.*) go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.3;; \
go1.19.*) go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.1;; \
go1.20.*) go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2;; \
go1.21.*) go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1;; \
*) go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest;; \
esac

.PHONY: .install.gitvalidation
.install.gitvalidation:
go install github.com/vbatts/git-validation@latest
Expand Down
Loading