Skip to content

Commit eef502f

Browse files
authored
[build] Improve markdown-link-check output (open-telemetry#602)
* Improve markdown-link-check output * Introduce errors to check if the build works * Revert "Introduce errors to check if the build works" This reverts commit b31f46f. * Merge markdown-link-check and enforce-markdown-link-check * Make Makefile more readable
1 parent 27e5c89 commit eef502f

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
name: Run Tools
2929
command: |
3030
make markdown-lint
31-
make enforce-markdown-link-check
31+
make markdown-link-check
3232
3333
workflows:
3434
version: 2

Makefile

+1-12
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,7 @@ install-markdown-link-check:
2323

2424
.PHONY: markdown-link-check
2525
markdown-link-check:
26-
find . -name \*.md -exec $(MARKDOWN_LINK_CHECK) {} \;
27-
28-
.PHONY: enforce-markdown-link-check
29-
enforce-markdown-link-check:
30-
@LINKCHECKOUT=`find . -name \*.md -exec $(MARKDOWN_LINK_CHECK) {} 2>&1 >/dev/null \;`; \
31-
if [ "$$LINKCHECKOUT" ]; then \
32-
echo "$(MARKDOWN_LINK_CHECK) FAILED => errors:\n"; \
33-
echo "Run 'make $(MARKDOWN_LINK_CHECK)' to see the errors"; \
34-
exit 1; \
35-
else \
36-
echo "Check markdown links finished successfully"; \
37-
fi
26+
find . -name \*.md -print0 | xargs -0 -n1 $(MARKDOWN_LINK_CHECK) --quiet
3827

3928
.PHONY: install-markdown-lint
4029
install-markdown-lint:

0 commit comments

Comments
 (0)