diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 68a6e692a46..958cc21fdd4 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -13,7 +13,7 @@ Fixes # (issue) # Checklist - [ ] I have performed a self-review of my own code -- [ ] I have run [clang-format](https://docs.openmc.org/en/latest/devguide/styleguide.html#automatic-formatting) (version 15) on any C++ source files (if applicable) +- [ ] I have run [clang-format](https://docs.openmc.org/en/latest/devguide/styleguide.html#automatic-formatting) (version 18) on any C++ source files (if applicable) - [ ] I have followed the [style guidelines](https://docs.openmc.org/en/latest/devguide/styleguide.html#python) for Python source files (if applicable) - [ ] I have made corresponding changes to the documentation (if applicable) - [ ] I have added tests that prove my fix is effective or that my feature works (if applicable) diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml index 42b28b2cdc6..ddb29be5a4a 100644 --- a/.github/workflows/format-check.yml +++ b/.github/workflows/format-check.yml @@ -31,7 +31,7 @@ jobs: style: file files-changed-only: true tidy-checks: '-*' - version: '15' # clang-format version + version: '18' # clang-format version format-review: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'cpp-format-suggest') }} passive-reviews: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'cpp-format-suggest') }} file-annotations: true diff --git a/AGENTS.md b/AGENTS.md index d24eb68da67..0ff2abbdc42 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -229,7 +229,7 @@ When modifying C++ public APIs, update corresponding ctypes signatures in `openm - **Include order**: Related header first, then C/C++ stdlib, third-party libs, local headers - **Comments**: C++-style (`//`) only, never C-style (`/* */`) - **Standard**: C++17 features allowed -- **Formatting**: Run `clang-format` (version 15) before committing; install via `tools/dev/install-commit-hooks.sh` +- **Formatting**: Run `clang-format` (version 18) before committing; install via `tools/dev/install-commit-hooks.sh` ### Python Style - **PEP8** compliant @@ -295,4 +295,4 @@ Check for optional features: 2. **ID conflicts**: Python objects with duplicate IDs trigger `IDWarning`, use `reset_auto_ids()` between tests 3. **MPI builds**: Code must work with and without MPI; use `#ifdef OPENMC_MPI` guards 4. **Path handling**: Use `pathlib.Path` in new Python code, not `os.path` -5. **Clang-format version**: CI uses version 15; other versions may produce different formatting +5. **Clang-format version**: CI uses version 18; other versions may produce different formatting diff --git a/docs/source/devguide/styleguide.rst b/docs/source/devguide/styleguide.rst index 2c882b0341f..a5599566e21 100644 --- a/docs/source/devguide/styleguide.rst +++ b/docs/source/devguide/styleguide.rst @@ -30,7 +30,7 @@ whenever a file is saved. For example, `Visual Studio Code support for running clang-format. .. note:: - OpenMC's CI uses `clang-format` version 15. A different version of `clang-format` + OpenMC's CI uses `clang-format` version 18. A different version of `clang-format` may produce different line changes and as a result fail the CI test. Miscellaneous diff --git a/include/openmc/volume_calc.h b/include/openmc/volume_calc.h index 9d3f1d02615..ef75ec0653c 100644 --- a/include/openmc/volume_calc.h +++ b/include/openmc/volume_calc.h @@ -34,7 +34,7 @@ class VolumeCalculation { vector atoms; //!< Number of atoms for each nuclide vector uncertainty; //!< Uncertainty on number of atoms int iterations; //!< Number of iterations needed to obtain the results - }; // Results for a single domain + }; // Results for a single domain // Constructors VolumeCalculation(pugi::xml_node node); diff --git a/src/mgxs.cpp b/src/mgxs.cpp index 65a7a0c55ca..a0fe4060ddb 100644 --- a/src/mgxs.cpp +++ b/src/mgxs.cpp @@ -365,7 +365,7 @@ Mgxs::Mgxs(const std::string& in_name, const vector& mat_kTs, } } } // end switch - } // end microscopic temperature loop + } // end microscopic temperature loop // Now combine the microscopic data at each relevant temperature // We will do this by treating the multiple temperatures of a nuclide as