Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "lint: fmt README.md (#694)" #695

Merged
merged 19 commits into from
Jan 28, 2025
Merged
38 changes: 30 additions & 8 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,41 @@ on:
workflow_dispatch:

jobs:
lint:
name: Lint
mdlint:
name: Markdown Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: xt0rted/markdownlint-problem-matcher@v3

- run: npm install -g markdownlint-cli

# disabled checks:
# - MD013/line-length
# - MD033/no-inline-html
# - MD034/no-bare-urls
# - MD036/no-emphasis-as-heading
# - MD041/first-line-heading/first-line-h1
- run: |
markdownlint --version

# List files to lint
ls *.md **/*.md

markdownlint \
--ignore '**/CHANGELOG.md' \
--disable MD013 MD033 MD034 MD036 MD041 -- \
*.md **/*.md

zshlint:
name: ZSH Lint
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
task: [markdown, zsh-noexec, zsh-zcompile]
task: [zsh-noexec, zsh-zcompile]

steps:
- uses: actions/checkout@v4
Expand All @@ -30,15 +57,10 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install --yes zsh
pip install --user linkify-it-py mdformat mdformat-config mdformat-gfm mdformat-shfmt mdformat-tables mdformat-toc

- name: "run lint (${{ matrix.task }})"
run: |
case "${{ matrix.task }}" in
markdown)
find . -name '*.md' ! -name 'CHANGELOG.md' -type f -print0 \
| xargs -0 -n1 -P4 mdformat --check --wrap 120 --number
;;
zsh-noexec)
find . -name '*.zsh' -type f -print0 \
| xargs -0 -n1 -P4 zsh -n
Expand Down
Loading
Loading