Minor dev-experience fixes for making spec changes. (#1387)
* Minor dev-experience fixes for making spec changes. * Fixes from review.
This commit is contained in:
parent
9090bbd736
commit
47fadaa237
19
Makefile
19
Makefile
|
|
@ -11,6 +11,7 @@ MARKDOWN_LINT=markdownlint
|
||||||
|
|
||||||
.PHONY: install-misspell
|
.PHONY: install-misspell
|
||||||
install-misspell:
|
install-misspell:
|
||||||
|
# TODO: Check for existence before installing
|
||||||
cd $(TOOLS_DIR) && go build -o $(MISSPELL_BINARY) github.com/client9/misspell/cmd/misspell
|
cd $(TOOLS_DIR) && go build -o $(MISSPELL_BINARY) github.com/client9/misspell/cmd/misspell
|
||||||
|
|
||||||
.PHONY: misspell
|
.PHONY: misspell
|
||||||
|
|
@ -23,6 +24,7 @@ misspell-correction:
|
||||||
|
|
||||||
.PHONY: install-markdown-link-check
|
.PHONY: install-markdown-link-check
|
||||||
install-markdown-link-check:
|
install-markdown-link-check:
|
||||||
|
# TODO: Check for existence before installing
|
||||||
npm install -g $(MARKDOWN_LINK_CHECK)
|
npm install -g $(MARKDOWN_LINK_CHECK)
|
||||||
|
|
||||||
.PHONY: markdown-link-check
|
.PHONY: markdown-link-check
|
||||||
|
|
@ -31,13 +33,28 @@ markdown-link-check:
|
||||||
|
|
||||||
.PHONY: install-markdownlint
|
.PHONY: install-markdownlint
|
||||||
install-markdownlint:
|
install-markdownlint:
|
||||||
|
# TODO: Check for existence before installing
|
||||||
npm install -g markdownlint-cli
|
npm install -g markdownlint-cli
|
||||||
|
|
||||||
.PHONY: markdownlint
|
.PHONY: markdownlint
|
||||||
markdownlint:
|
markdownlint:
|
||||||
@echo $(ALL_DOCS)
|
|
||||||
@for f in $(ALL_DOCS); do echo $$f; $(MARKDOWN_LINT) -c .markdownlint.yaml $$f || exit 1; done
|
@for f in $(ALL_DOCS); do echo $$f; $(MARKDOWN_LINT) -c .markdownlint.yaml $$f || exit 1; done
|
||||||
|
|
||||||
.PHONY: table-generation
|
.PHONY: table-generation
|
||||||
table-generation:
|
table-generation:
|
||||||
docker run --rm -v $(PWD)/semantic_conventions:/source -v $(PWD)/specification:/spec otel/semconvgen -f /source markdown -md /spec
|
docker run --rm -v $(PWD)/semantic_conventions:/source -v $(PWD)/specification:/spec otel/semconvgen -f /source markdown -md /spec
|
||||||
|
|
||||||
|
# Run all checks in order of speed / likely failure.
|
||||||
|
.PHONY: check
|
||||||
|
check: misspell markdownlint markdown-link-check
|
||||||
|
@echo "All checks complete"
|
||||||
|
|
||||||
|
# Attempt to fix issues / regenerate tables.
|
||||||
|
.PHONY: fix
|
||||||
|
fix: table-generation misspell-correction
|
||||||
|
@echo "All autofixes complete"
|
||||||
|
|
||||||
|
# Attempt to install all the tools
|
||||||
|
.PHONY: install-tools
|
||||||
|
install-tools: install-misspell install-markdownlint install-markdown-link-check
|
||||||
|
@echo "All tools installed"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue