Skip to content

Commit

Permalink
Fix formatter to older version (#1843)
Browse files Browse the repository at this point in the history
* Fix formatter to older version

* fix JuliaFormatter version also in utils folder

* Update utils/trixi-format-file.jl

Co-authored-by: Arpit Babbar <[email protected]>

* Update utils/trixi-format.jl

Co-authored-by: Arpit Babbar <[email protected]>

* Apply suggestions from code review

Co-authored-by: Joshua Lampert <[email protected]>

* format

---------

Co-authored-by: Arpit Babbar <[email protected]>
Co-authored-by: Joshua Lampert <[email protected]>
  • Loading branch information
3 people authored Feb 14, 2024
1 parent fe6a527 commit 4369c1c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# TODO: Change the call below to
# format(".")
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter"))'
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"))'
julia -e 'using JuliaFormatter; format(["benchmark", "examples", "ext", "src", "test", "utils"])'
- name: Format check
run: |
Expand Down
3 changes: 2 additions & 1 deletion utils/trixi-format-file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

using Pkg
Pkg.activate(; temp = true, io = devnull)
Pkg.add("JuliaFormatter"; preserve = PRESERVE_ALL, io = devnull)
Pkg.add(PackageSpec(name = "JuliaFormatter", version = "1.0.45"); preserve = PRESERVE_ALL,
io = devnull)

using JuliaFormatter: format_file

Expand Down
3 changes: 2 additions & 1 deletion utils/trixi-format.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

using Pkg
Pkg.activate(; temp = true, io = devnull)
Pkg.add("JuliaFormatter"; preserve = PRESERVE_ALL, io = devnull)
Pkg.add(PackageSpec(name = "JuliaFormatter", version = "1.0.45"); preserve = PRESERVE_ALL,
io = devnull)

using JuliaFormatter: format

Expand Down

0 comments on commit 4369c1c

Please sign in to comment.