From 3d4c02a403a2d50b0f5c25d9a2f8d872aceb7ecf Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Wed, 18 Feb 2026 17:25:47 +0000 Subject: [PATCH 1/2] Format with clang-format-15 --- src/cong.cpp | 2 +- src/froidure-pin.cpp | 2 +- src/hpcombi.cpp | 2 +- src/konieczny.cpp | 2 +- src/main.cpp | 4 ++-- src/present.cpp | 2 +- src/schreier-sims.cpp | 2 +- src/todd-coxeter.cpp | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cong.cpp b/src/cong.cpp index 94c75722..7a439b69 100644 --- a/src/cong.cpp +++ b/src/cong.cpp @@ -250,7 +250,7 @@ obviously infinite; ``False`` is returned if it is not. congruence has infinitely many classes. )pbdoc"); } // bind_cong - } // namespace + } // namespace void init_cong(py::module& m) { bind_cong(m, "CongruenceWord"); diff --git a/src/froidure-pin.cpp b/src/froidure-pin.cpp index ea427bd0..c31e41b0 100644 --- a/src/froidure-pin.cpp +++ b/src/froidure-pin.cpp @@ -1269,7 +1269,7 @@ This function returns the element of *fp* obtained by evaluating *w*. }); } } // bind_froidure_pin_stateful - } // namespace + } // namespace void init_froidure_pin(py::module& m) { bind_froidure_pin_stateless>(m, "Transf1"); diff --git a/src/hpcombi.cpp b/src/hpcombi.cpp index 30708cc0..7245cc02 100644 --- a/src/hpcombi.cpp +++ b/src/hpcombi.cpp @@ -2406,7 +2406,7 @@ This function returns a newly constructed :any:`PPerm16` with the same image as True )pbdoc"); } // init_hpcombi_pperm16 - } // namespace + } // namespace } // namespace HPCombi namespace libsemigroups { diff --git a/src/konieczny.cpp b/src/konieczny.cpp index d8778813..801b92d5 100644 --- a/src/konieczny.cpp +++ b/src/konieczny.cpp @@ -740,7 +740,7 @@ not already known. int )pbdoc"); } // bind_konieczny - } // namespace + } // namespace void init_konieczny(py::module& m) { bind_konieczny(m, "BMat8"); diff --git a/src/main.cpp b/src/main.cpp index caba008a..fe397bef 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -36,13 +36,13 @@ namespace libsemigroups { #ifdef VERSION_INFO m.attr("__version__") = VERSION_INFO; #else - m.attr("__version__") = "dev"; + m.attr("__version__") = "dev"; #endif #ifdef LIBSEMIGROUPS_EIGEN_ENABLED m.attr("LIBSEMIGROUPS_EIGEN_ENABLED") = static_cast(LIBSEMIGROUPS_EIGEN_ENABLED); #else - m.attr("LIBSEMIGROUPS_EIGEN_ENABLED") = false; + m.attr("LIBSEMIGROUPS_EIGEN_ENABLED") = false; #endif #ifdef LIBSEMIGROUPS_HPCOMBI_ENABLED diff --git a/src/present.cpp b/src/present.cpp index 50c89e92..66e09ae2 100644 --- a/src/present.cpp +++ b/src/present.cpp @@ -1655,7 +1655,7 @@ defined in the alphabet, and that the inverses act as semigroup inverses. * :any:`presentation.throw_if_bad_inverses` )pbdoc"); } // bind_inverse_present - } // namespace + } // namespace void init_present(py::module& m) { bind_present(m, "PresentationWord"); diff --git a/src/schreier-sims.cpp b/src/schreier-sims.cpp index 2cc5b5ed..20dc8464 100644 --- a/src/schreier-sims.cpp +++ b/src/schreier-sims.cpp @@ -516,7 +516,7 @@ corresponding to the intersection of *x* and *y*. :raises LibsemigroupsError: if *result* is not empty. )pbdoc"); } // bind_schreier_sims - } // namespace + } // namespace void init_schreier_sims(py::module& m) { // One call to bind is required per list of types diff --git a/src/todd-coxeter.cpp b/src/todd-coxeter.cpp index 3a119575..038d2915 100644 --- a/src/todd-coxeter.cpp +++ b/src/todd-coxeter.cpp @@ -633,7 +633,7 @@ Pro). :param tc: the :any:`ToddCoxeter` instance. :type tc: ToddCoxeter)pbdoc"); } // bind_todd_coxeter - } // namespace + } // namespace void init_todd_coxeter(py::module& m) { bind_todd_coxeter(m, "ToddCoxeterWord"); From 09c02a7171635ab64bdb9b90f752587e6b5135e3 Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Wed, 18 Feb 2026 17:29:47 +0000 Subject: [PATCH 2/2] CI: Add clang-format job --- .github/workflows/lint.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 339392f0..2699a6dc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -73,3 +73,12 @@ jobs: # Lint with ruff and cpplint - name: "Lint with pylint . . ." run: uv run pylint $PYTHON_FILES + clang-format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Run clang-format style check on src + uses: joseph-edwards/clang-format-action@v1.0.1 + with: + clang-format-version: 15 + check-path: "src"