2024-04-26 09:13:48 +00:00
|
|
|
name: CI
|
2024-04-20 15:06:48 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-12-18 16:38:58 +00:00
|
|
|
- uses: actions/setup-python@v5
|
|
|
|
with:
|
|
|
|
python-version: '3.13'
|
|
|
|
- run: pip install -r lint/requirements.txt
|
2024-10-12 15:31:57 +00:00
|
|
|
- uses: ruby/setup-ruby@v1
|
2024-04-20 15:06:48 +00:00
|
|
|
with:
|
|
|
|
ruby-version: '3.2'
|
|
|
|
- run: gem install mdl
|
2024-12-18 16:38:58 +00:00
|
|
|
|
|
|
|
- name: Files are UTF-8
|
|
|
|
run: ./lint/encoding.sh .
|
2024-12-19 01:39:21 +00:00
|
|
|
- name: "No non-breaking spaces"
|
2024-12-19 01:28:54 +00:00
|
|
|
run: |
|
|
|
|
if grep -rI --include='*.md' $'\u00A0' .; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2024-12-19 01:39:21 +00:00
|
|
|
- name: "No zero-width spaces"
|
2024-12-19 01:28:54 +00:00
|
|
|
run: |
|
|
|
|
if grep -rI --include='*.md' $'\u200B' .; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2024-12-19 01:39:21 +00:00
|
|
|
- name: "No carriage return"
|
|
|
|
run: |
|
|
|
|
if grep -rI --include='*.md' $'\u000D' .; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2024-12-20 18:12:20 +00:00
|
|
|
- name: "GitHub/JavaScript/TypeScript capitalized properly"
|
|
|
|
run: |
|
|
|
|
if grep -rI --include='*.md' -E "Github|Javascript|Typescript" .; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-12-18 16:38:58 +00:00
|
|
|
- name: Lint Markdown
|
2024-12-19 02:19:36 +00:00
|
|
|
run: mdl . --ignore-front-matter -r MD003,MD005,MD011,MD018,MD019,MD023,MD025,MD027,MD028,MD030,MD035,MD037,MD038,MD039,MD046,MD047
|
2024-12-18 16:38:58 +00:00
|
|
|
- name: Lint frontmatter
|
|
|
|
run: ./lint/frontmatter.py .
|