Compare commits
27 Commits
7ae470e530
...
3395c52216
| Author | SHA1 | Date | |
|---|---|---|---|
| 3395c52216 | |||
| b87b72d4b9 | |||
| e7b49d58ab | |||
| 919229f224 | |||
| 68cffba35d | |||
| 26cbb63749 | |||
| bf1d3c6bad | |||
| dca3c50cd2 | |||
| 1ee0d291ca | |||
| 2f7e37153c | |||
| 26909b058a | |||
| 2dfdc5f095 | |||
| 217d60eeaa | |||
| f7ba056814 | |||
| 82eb352eb5 | |||
| 0296e26210 | |||
| 1e05fa0dd7 | |||
| bec964fc20 | |||
| b1451bb17e | |||
| ee83f50281 | |||
| 76f79af733 | |||
| 070a8a5447 | |||
| 40516d1263 | |||
| a66e1f9844 | |||
| 5e4df7d04f | |||
| d34868a9c4 | |||
| 04fce150bc |
6
Makefile
6
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: all bootstrap setup check test lint fmt fmt-check build clean deps test-coverage test-integration local install release release-snapshot docker hooks
|
||||
.PHONY: all bootstrap setup check test lint lint-fix fmt fmt-check build clean deps test-coverage test-integration local install release release-snapshot docker hooks
|
||||
|
||||
# Version number
|
||||
VERSION := 1.0.0-rc.1
|
||||
@@ -43,6 +43,10 @@ fmt:
|
||||
lint:
|
||||
@script/lint
|
||||
|
||||
# Apply the linter's autofixes (rewrites files).
|
||||
lint-fix:
|
||||
@script/lint-fix
|
||||
|
||||
# Build binary.
|
||||
vaultik: internal/*/*.go cmd/vaultik/*.go
|
||||
go build -ldflags "$(LDFLAGS)" -o $@ ./cmd/vaultik
|
||||
|
||||
@@ -572,6 +572,7 @@ them. We provide:
|
||||
image tag)
|
||||
* `script/test` — run the test suite (verbose rerun on failure)
|
||||
* `script/lint` — run `golangci-lint run ./...`
|
||||
* `script/lint-fix` — apply the linter's autofixes (rewrites files)
|
||||
* `script/fmt` — format all code (writes)
|
||||
* `script/fmt-check` — check formatting (read-only)
|
||||
* `script/check` — run `script/test`, `script/lint`, and
|
||||
|
||||
15
script/lint-fix
Executable file
15
script/lint-fix
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# script/lint-fix: run the linter's autofixer. Rewrites files in place
|
||||
# for every finding the enabled linters know how to fix; findings
|
||||
# without an autofix are reported but left alone (exit status is
|
||||
# nonzero while any remain).
|
||||
set -eu
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||
|
||||
main() {
|
||||
cd "$ROOT"
|
||||
golangci-lint run --fix ./...
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user