-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Uwe Hernandez Acosta <u.hernandez@hzdr.de>
- Loading branch information
Showing
5 changed files
with
33 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[deps] | ||
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using JuliaFormatter | ||
|
||
# we assume the format_all.jl script is located in QEDevents.jl/.formatting | ||
project_path = Base.Filesystem.joinpath(Base.Filesystem.dirname(Base.source_path()), "..") | ||
|
||
not_formatted = format(project_path; verbose=true) | ||
if not_formatted | ||
@info "Formatting verified." | ||
else | ||
@warn "Formatting verification failed: Some files are not properly formatted!" | ||
end | ||
exit(not_formatted ? 0 : 1) |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: formatter | ||
on: [pull_request] | ||
jobs: | ||
formatter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v4 | ||
- name: install Julia | ||
uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: 1.9 | ||
- name: Install Julia requirements | ||
run: julia --project=${GITHUB_WORKSPACE}/.formatting -e 'import Pkg; Pkg.instantiate()' | ||
- name: Check code style | ||
run: julia --project=${GITHUB_WORKSPACE}/.formatting ${GITHUB_WORKSPACE}/.formatting/format_all.jl | ||
|
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