typo #146
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Format | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
docs: | |
name: CheckFormatting | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- shell: julia --project=format --color=yes {0} | |
run: | | |
using Pkg | |
Pkg.instantiate() | |
- shell: julia --project=format --color=yes {0} | |
run: | | |
using FormatJDS: | |
project_has_trailing_whitespace, | |
remove_trailing_whitespace | |
exitcode = project_has_trailing_whitespace() ? 1 : 0 | |
println(exitcode == 1 ? "Trailing whitespace found" : "No trailing whitespace found") | |
if exitcode == 1 | |
# Show where the trailing whitespace occurs. | |
remove_trailing_whitespace() | |
run(`git config --global color.diff true`) | |
run(`git diff`) | |
end | |
exit(exitcode) |