mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-11 08:55:27 +03:00
🐛 Validate doc on pre-submit (#1235)
* validate doc on pre-submit * typo
This commit is contained in:
parent
929fd6e9e4
commit
ae271b4513
10
Makefile
10
Makefile
@ -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)'
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user