diff --git a/.formatting/Project.toml b/.formatting/Project.toml new file mode 100644 index 0000000..f3aab8b --- /dev/null +++ b/.formatting/Project.toml @@ -0,0 +1,2 @@ +[deps] +JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" diff --git a/.formatting/format_all.jl b/.formatting/format_all.jl new file mode 100644 index 0000000..dc9d9c8 --- /dev/null +++ b/.formatting/format_all.jl @@ -0,0 +1,12 @@ +using JuliaFormatter + +# we asume the format_all.jl script is located in QEDfields.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)