Skip to content

Commit cc9515d

Browse files
committed
feat: make file-ref-check
1 parent 71067b7 commit cc9515d

3 files changed

Lines changed: 22 additions & 17 deletions

File tree

.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

mission-control/docs/guide/config-db/concepts/plugins.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ For example, if you want to exclude all events with severity="info", a scrape pl
4646
When you encounter a diff change, unlike an event-based change, it can sometimes appear unclear. The summary of the change may not immediately indicate its purpose.
4747
For example, the change 'status.images' might not be self-explanatory. To clarify this, you can assign types to these diff changes using mapping.
4848

49-
```yaml title="plugin-change-mapping.yaml" file=<rootDir>/modules/config-db/fixtures/plugin-change-mapping.yaml
49+
```yaml title="plugin-change-mapping.yaml" file=<rootDir>/modules/config-db/fixtures/plugins/kubernetes-change-type-mapping.yaml
5050
```
5151

5252
<Fields

0 commit comments

Comments
 (0)