Skip to content

Commit 3951ab8

Browse files
authored
Update crd-docs (#3391)
* CRD & doc update Issue: [sc-12818] * Change linter GH action This splits the GH linter action that was checking for TODOs and trailing spaces in the documentation into two actions: * one that checks TODOs and trailing spaces in all files except the crd * one that checks TODOs only in the crd.md file
1 parent df492f1 commit 3951ab8

File tree

2 files changed

+3560
-669
lines changed

2 files changed

+3560
-669
lines changed

.github/workflows/lint.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# - https://bugs.launchpad.net/ubuntu/+source/mawk/+bug/69724
1717
- run: awk -W version && awk '{ exit 1 != match($0, /[[:space:]]/) }' <<< ' '
1818
- run: |
19-
find docs/content -not -type d -print0 | xargs -0 awk '
19+
find docs/content -not -type d -not -name crd.md -print0 | xargs -0 awk '
2020
BEGIN { print "::add-matcher::.github/actions/awk-matcher.json" }
2121
2222
/[[:space:]]$/ { errors++; print FILENAME ":" FNR " error: Trailing space" }
@@ -26,6 +26,23 @@ jobs:
2626
END { exit errors != 0 }
2727
'
2828
29+
documentation-crd:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v3
33+
34+
# The `documentation-crd` job only checks the crd.md for `TODO`,
35+
# as some of the upstream documentation has trailing spaces
36+
- run: |
37+
find docs/content -name crd.md -print0 | xargs -0 awk '
38+
BEGIN { print "::add-matcher::.github/actions/awk-matcher.json" }
39+
40+
/TODO/ { errors++; print FILENAME ":" FNR " error: Found TODO. Try running hack/create-todo-patch.sh" }
41+
42+
END { print "::remove-matcher owner=awk::" }
43+
END { exit errors != 0 }
44+
'
45+
2946
golangci-lint:
3047
runs-on: ubuntu-latest
3148
steps:

0 commit comments

Comments
 (0)