Skip to content

Add support for alignment in lines with zero-width characters #10

Add support for alignment in lines with zero-width characters

Add support for alignment in lines with zero-width characters #10

Workflow file for this run

# This workflow tests that the pre-commit hook works as expected.
name: PreCommitHooks
on:
push:
tags:
- '*'
branches:
- 'master'
pull_request:
branches:
- 'master'
jobs:
pre-commit:
name: julia-formatter hook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: julia-actions/setup-julia@v3
with:
version: '1'
- name: Install checked out JuliaFormatter in global env
run: |
julia -e 'using Pkg; Pkg.add(; path=".")'
- uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Test pre-commit hook
working-directory: .github/workflows/pre-commit
run: |
# Run pre-commit hook, check that it fails.
# pre-commit try-repo will fail if the hook makes changes
pipx run pre-commit try-repo ../../../ julia-formatter --files main.jl --verbose && exit 1
# Check that the file was changed.
git diff --exit-code main.jl && exit 1
# Check that running the hook again succeeds.
pipx run pre-commit try-repo ../../../ julia-formatter --files main.jl --verbose