🐛 Validate doc on pre-submit (#1235)

* validate doc on pre-submit

* typo
This commit is contained in:
laurentsimon 2021-11-10 08:56:44 -08:00 committed by GitHub
parent 929fd6e9e4
commit ae271b4513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -47,7 +47,7 @@ $(PROTOC):
################################## make all ###################################
all: ## Runs build, test and verify
all-targets = update-dependencies build check-linter check-osv unit-test add-projects validate-projects tree-status
all-targets = update-dependencies build check-linter check-osv unit-test validate-docs add-projects validate-projects tree-status
.PHONY: all $(all-targets)
all: $(all-targets)
@ -111,13 +111,15 @@ clients/branch.pb.go: clients/branch.proto | $(PROTOC)
protoc --go_out=../../../ clients/branch.proto
generate-docs: ## Generates docs
generate-docs: docs/checks.md
generate-docs: validate-docs docs/checks.md
docs/checks.md: docs/checks/internal/checks.yaml docs/checks/internal/*.go docs/checks/internal/generate/*.go
# Validating checks.yaml
go run ./docs/checks/internal/validate/main.go
# Generating checks.md
go run ./docs/checks/internal/generate/main.go docs/checks.md
validate-docs: docs/checks/internal/generate/main.go
# Validating checks.yaml
go run ./docs/checks/internal/validate/main.go
build-scorecard: ## Runs go build on repo
# Run go build and generate scorecard executable
CGO_ENABLED=0 go build -trimpath -a -tags netgo -ldflags '$(LDFLAGS)'

View File

@ -53,7 +53,7 @@ var (
}
)
// Indentify the source file that declares each check.
// Identify the source file that declares each check.
func listCheckFiles() (map[string]string, error) {
checkFiles := make(map[string]string)
// Use regex to determine the file that contains the entry point.