Added missing newlines #7
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: Formatter | |
on: | |
pull_request: | |
push: | |
branches: | |
- 'main' | |
tags: '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Check out repository" | |
uses: actions/checkout@v4 | |
- name: "Set up Julia" | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1.10' | |
arch: x64 | |
- name: Install JuliaFormatter and format | |
run: julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter")); using JuliaFormatter; format(".", verbose=true)' | |
- name: Format check | |
run: | | |
julia -e ' | |
out = Cmd(`git diff`) |> read |> String | |
if out == "" | |
exit(0) | |
else | |
@error "Some files are not formatted! Please use the SciMLStyle to format your files!" | |
write(stdout, out) | |
exit(1) | |
end' |