1
0
Fork 0
mirror of https://github.com/zdharma-continuum/fast-syntax-highlighting.git synced 2025-01-30 21:28:18 +01:00
fast-syntax-highlighting/.github/workflows/linting.yml
vladislav doster 9469bd0e7e
maint: add linting Github action workflow (#29)
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
2022-04-25 01:18:04 -05:00

38 lines
1,018 B
YAML

name: Lint
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
brew install shellcheck shfmt zsh
pip3 install --user linkify-it-py mdformat mdformat-config mdformat-gfm mdformat-shfmt mdformat-tables mdformat-toc
- name: run mdformat
run: find . -name '*.md' -type f -print0 | xargs -0 -n1 -P4 python3 -m mdformat --check --wrap 120
- name: run shfmt
run: find . -name '*.sh' -type f -print0 | xargs -0 -n1 -P4 shfmt -bn -ci -d -i 2 -ln bash -s -sr
- name: run shellcheck
run: find . -name '*.sh' -type f -print0 | xargs -0 -n1 -P4 shellcheck
- name: "run zsh"
run: find . -name '*.zsh' -type f -print0 | xargs -0 -n1 -P4 zsh -n
- name: "run zcompile"
run: find . -name '*.zsh' -type f -exec zsh -fc "zcompile {}" \;