diff --git a/.github/workflows/Format.yml b/.github/workflows/Format.yml new file mode 100644 index 00000000..dd2b2c50 --- /dev/null +++ b/.github/workflows/Format.yml @@ -0,0 +1,12 @@ +name: Format suggestions +on: + pull_request: + # this argument is not required if you don't use the `suggestion-label` input + types: [opened, reopened, synchronize, labeled, unlabeled] +jobs: + code-style: + runs-on: ubuntu-latest + steps: + - uses: julia-actions/julia-format@v4 + with: + version: '1' # Set `version` to '1.0.54' if you need to use JuliaFormatter.jl v1.0.54 (default: '1') diff --git a/ext/SparseMatrixColoringsColorsExt.jl b/ext/SparseMatrixColoringsColorsExt.jl index 7f844e89..c934b5e9 100644 --- a/ext/SparseMatrixColoringsColorsExt.jl +++ b/ext/SparseMatrixColoringsColorsExt.jl @@ -271,9 +271,8 @@ function show_colors!( A_ccolor_indices = mod1.(column_colors(res), length(colorscheme)) A_rcolor_indices = mod1.(row_shift .+ row_colors(res), length(colorscheme)) B_ccolor_indices = mod1.(1:maximum(column_colors(res)), length(colorscheme)) - B_rcolor_indices = mod1.( - (row_shift + 1):(row_shift + maximum(row_colors(res))), length(colorscheme) - ) + B_rcolor_indices = + mod1.((row_shift + 1):(row_shift + maximum(row_colors(res))), length(colorscheme)) A_ccolors = colorscheme[A_ccolor_indices] A_rcolors = colorscheme[A_rcolor_indices] B_ccolors = colorscheme[B_ccolor_indices] diff --git a/src/postprocessing.jl b/src/postprocessing.jl index 9b0443b2..7b2b58f5 100644 --- a/src/postprocessing.jl +++ b/src/postprocessing.jl @@ -109,9 +109,7 @@ function postprocess_with_star_set!( end function postprocess_with_tree_set!( - color_used::Vector{Bool}, - color::AbstractVector{<:Integer}, - tree_set::TreeSet, + color_used::Vector{Bool}, color::AbstractVector{<:Integer}, tree_set::TreeSet ) # only the colors of non-leaf vertices are used (; reverse_bfs_orders, is_star, tree_edge_indices, nt) = tree_set diff --git a/test/Project.toml b/test/Project.toml index 217d62c9..284f410b 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -15,7 +15,6 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" JuMP = "4076af6c-e467-56ae-b986-b466b2749572" -JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" MatrixDepot = "b51810bb-c9f3-55da-ae3c-350fc1fbce05" MiniZinc = "a7f392d2-6c35-496e-b8cc-0974fbfcbf91" diff --git a/test/runtests.jl b/test/runtests.jl index 7a070756..9494e5e2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,6 @@ using Aqua using Documenter using JET -using JuliaFormatter using SparseMatrixColorings using Test @@ -19,17 +18,13 @@ include("utils.jl") else @testset verbose = true "Code quality" begin @testset "Aqua" begin - Aqua.test_all(SparseMatrixColorings; stale_deps = (; ignore = [:Requires])) + Aqua.test_all(SparseMatrixColorings; undocumented_names=true) end @testset "JET" begin - JET.test_package(SparseMatrixColorings; target_defined_modules = true) - end - # @testset "JuliaFormatter" begin - # TODO: switch to Runic (temporarily deactivated) - # @test JuliaFormatter.format( - # SparseMatrixColorings; verbose=false, overwrite=false - # ) - # end + JET.test_package( + SparseMatrixColorings; target_modules=(SparseMatrixColorings,) + ) + end @testset "Doctests" begin Documenter.doctest(SparseMatrixColorings) end