Skip to content

Commit d45f70b

Browse files
committed
feat: make file-ref-check
1 parent c44ba5c commit d45f70b

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,7 @@ jobs:
3636
npm run build
3737
3838
- name: Check for broken file references
39-
run: |
40-
cd "${{ matrix.repo }}/build"
41-
echo "Checking for broken files in $(pwd)"
42-
43-
echo "Total files: $(ls -alh . | wc -l)"
44-
echo "Total HTML files: $(find . -type f -name "*.html" | wc -l)"
45-
46-
echo "Ripgrep"
47-
if rg 'file=../../../modules' -g '*.html' | grep -q .; then
48-
echo "Matches found. Exiting with code 0."
49-
rg 'file=../../../modules' -g '*.html'
50-
exit 1
51-
else
52-
echo "No matches found"
53-
exit 0
54-
fi
39+
run: make file-ref-check
5540

5641
prettier:
5742
name: prettier

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,26 @@ fmt:
4646
fmt-check:
4747
npx prettier --check --log-level=debug "**/*.md"
4848

49+
.PHONY: build
50+
build:
51+
@echo "Building mission-control documentation..."
52+
@cd modules && make all
53+
@cd mission-control && npm ci && npm run build
54+
55+
.PHONY: file-ref-check
56+
file-ref-check: ## Check for broken file references in build output
57+
@echo "Checking for broken files in mission-control/build"
58+
@cd mission-control/build && \
59+
echo "Total files: $$(ls -alh . | wc -l)" && \
60+
echo "Total HTML files: $$(find . -type f -name "*.html" | wc -l)" && \
61+
if rg 'file=../../../modules' -g '*.html' | grep -q .; then \
62+
echo "ERROR: Found broken file references:" && \
63+
rg 'file=../../../modules' -g '*.html' && \
64+
exit 1; \
65+
else \
66+
echo "No broken file references found"; \
67+
fi
68+
4969
.PHONY:
5070
sync:
5171
git submodule update --init --recursive

styles/ignore/words-with-suggestions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ Junit
242242
JUnit
243243
keypair
244244
keypairs
245+
kmsConnection
245246
knowledgebase
246247
knowledgebases
247248
Kratos

0 commit comments

Comments
 (0)