Skip to content

Commit e962050

Browse files
committed
Replaced linters with standard web based linters
1 parent c762c0d commit e962050

File tree

3 files changed

+24
-773
lines changed

3 files changed

+24
-773
lines changed

.github/workflows/website-docs.yml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -72,38 +72,39 @@ jobs:
7272
WEBSITE_INCLUDE_JAVADOCS: "true"
7373
WEBSITE_INCLUDE_DEVGUIDE: "true"
7474

75-
- name: Lint markdown links and static images
75+
- name: Install HTMLProofer
7676
run: |
7777
set -euo pipefail
78-
python3 scripts/website/lint_markdown_links.py \
79-
--content-root docs/website/content \
80-
--static-root docs/website/static \
81-
--redirects-file docs/website/static/_redirects \
82-
--max-log-errors 300 \
83-
--report-file docs/website/reports/markdown-link-lint-report.txt
84-
85-
- name: Upload markdown link lint report
86-
if: ${{ always() }}
87-
uses: actions/upload-artifact@v4
88-
with:
89-
name: markdown-link-lint-report
90-
path: docs/website/reports/markdown-link-lint-report.txt
91-
if-no-files-found: ignore
78+
gem install --no-document html-proofer
9279
93-
- name: Audit source URLs (absolute/WordPress)
80+
- name: Validate internal links and images
9481
run: |
9582
set -euo pipefail
96-
python3 scripts/website/audit_source_urls.py \
97-
--root docs/website \
98-
--report-file docs/website/reports/source-url-audit.txt \
99-
--max-log 120
83+
htmlproofer docs/website/public \
84+
--checks Links,Images \
85+
--disable-external \
86+
--assume-extension \
87+
--allow-hash-href
10088
101-
- name: Upload source URL audit report
89+
- name: Reject absolute codenameone.com links
90+
run: |
91+
set -euo pipefail
92+
report="docs/website/reports/disallowed-codenameone-links.txt"
93+
mkdir -p "$(dirname "$report")"
94+
rg -n --no-heading -S '\]\((https?:)?//(www\.)?codenameone\.com([/:?#)]|$)|<https?://(www\.)?codenameone\.com([/:?#>]|$)|(href|src)=["'"'"']https?://(www\.)?codenameone\.com([/:?#]|$)' \
95+
docs/website/content docs/website/layouts docs/website/static > "$report" || true
96+
if [ -s "$report" ]; then
97+
echo "Disallowed absolute codenameone.com links found (use relative URLs or non-www subdomains):" >&2
98+
sed -n '1,200p' "$report" >&2
99+
exit 1
100+
fi
101+
102+
- name: Upload codenameone link policy report
102103
if: ${{ always() }}
103104
uses: actions/upload-artifact@v4
104105
with:
105-
name: source-url-audit
106-
path: docs/website/reports/source-url-audit.txt
106+
name: codenameone-link-policy-report
107+
path: docs/website/reports/disallowed-codenameone-links.txt
107108
if-no-files-found: ignore
108109

109110
- name: Validate OTA skin output

0 commit comments

Comments
 (0)