From 4339ab1bcaee0a5c1b46b513b0bf376c85a3037b Mon Sep 17 00:00:00 2001 From: Joaquim Date: Thu, 29 May 2025 00:10:12 -0700 Subject: [PATCH 1/2] Create format_check.yml --- .github/workflows/format_check.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/format_check.yml diff --git a/.github/workflows/format_check.yml b/.github/workflows/format_check.yml new file mode 100644 index 0000000..c4482c2 --- /dev/null +++ b/.github/workflows/format_check.yml @@ -0,0 +1,30 @@ +name: format-check +on: + push: + branches: + - master + - release-* + pull_request: + types: [opened, synchronize, reopened] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: julia-actions/setup-julia@latest + with: + version: '1' + - uses: actions/checkout@v4 + - name: Format check + shell: julia --color=yes {0} + run: | + using Pkg + Pkg.add(PackageSpec(name="JuliaFormatter", version="1")) + using JuliaFormatter + format(".", verbose=true) + out = String(read(Cmd(`git diff`))) + if isempty(out) + exit(0) + end + @error "Some files have not been formatted !!!" + write(stdout, out) + exit(1) From e98e93e572b95a499ef6aa8b6167d9f88b42927a Mon Sep 17 00:00:00 2001 From: joaquimg Date: Thu, 29 May 2025 01:11:40 -0700 Subject: [PATCH 2/2] format --- docs/make.jl | 2 +- test/MathOptConflictSolver.jl | 2 +- test/runtests.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index f5577d2..74a9806 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -5,4 +5,4 @@ makedocs(; sitename = "MathOptConflictSolver.jl documentation") deploydocs(; repo = "github.com/jump-dev/MathOptConflictSolver.jl.git", push_preview = true, -) \ No newline at end of file +) diff --git a/test/MathOptConflictSolver.jl b/test/MathOptConflictSolver.jl index 959bf72..a0e7ff3 100644 --- a/test/MathOptConflictSolver.jl +++ b/test/MathOptConflictSolver.jl @@ -28,4 +28,4 @@ end end # module TestMathOptConflictSolver -TestMathOptConflictSolver.runtests() \ No newline at end of file +TestMathOptConflictSolver.runtests() diff --git a/test/runtests.jl b/test/runtests.jl index c90e4b8..12287cd 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -14,4 +14,4 @@ using Test include(file) end end -end \ No newline at end of file +end