Skip to content

Commit

Permalink
*: introduce errors documentation generator to generate errors.toml (p…
Browse files Browse the repository at this point in the history
…ingcap#20516)

Signed-off-by: Lonng <heng@lonng.org>
  • Loading branch information
lonng authored Oct 21, 2020
1 parent 2f067c0 commit f750afb
Show file tree
Hide file tree
Showing 5 changed files with 1,630 additions and 13 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ dev: checklist check test
# Install the check tools.
check-setup:tools/bin/revive tools/bin/goword tools/bin/gometalinter tools/bin/gosec

check: fmt errcheck unconvert lint tidy testSuite check-static vet staticcheck
check: fmt errcheck unconvert lint tidy testSuite check-static vet staticcheck errdoc

# These need to be fixed before they can be ran regularly
check-fail: goword check-slow
Expand Down Expand Up @@ -127,6 +127,10 @@ gogenerate:
@echo "go generate ./..."
./tools/check/check-gogenerate.sh

errdoc:tools/bin/errdoc-gen
@echo "generator errors.toml"
./tools/check/check-errdoc.sh

lint:tools/bin/revive
@echo "linting"
@tools/bin/revive -formatter friendly -config tools/check/revive.toml $(FILES)
Expand Down Expand Up @@ -299,6 +303,9 @@ tools/bin/unconvert: tools/check/go.mod
tools/bin/failpoint-ctl: go.mod
$(GO) build -o $@ github.com/pingcap/failpoint/failpoint-ctl

tools/bin/errdoc-gen: go.mod
$(GO) build -o $@ github.com/pingcap/tiup/components/errdoc/errdoc-gen

tools/bin/golangci-lint:
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b ./tools/bin v1.29.0

Expand Down
Loading

0 comments on commit f750afb

Please sign in to comment.