Skip to content

Fix check code format wf #288

Fix check code format wf

Fix check code format wf #288

---
name: check_code_format
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
check_format_code:
name: check format code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: jiro4989/setup-nim-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
nim-install-directory: ${{ runner.temp }}/nim_runtime
- name: Format code
run: |
git clean -f -x -d
nim prettyfy
- name: Fail if needs reformatting
run: |
if [[ $(git status --porcelain) ]]; then
echo "please reformat/prettyfy these files:"
git status --porcelain=v1
exit 1
fi
...