Skip to content

Commit b3788f1

Browse files
authored
Use clang-format version 18 for CI format checks (#3840)
1 parent 1d9a8f5 commit b3788f1

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Fixes # (issue)
1313
# Checklist
1414

1515
- [ ] I have performed a self-review of my own code
16-
- [ ] 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)
16+
- [ ] 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)
1717
- [ ] I have followed the [style guidelines](https://docs.openmc.org/en/latest/devguide/styleguide.html#python) for Python source files (if applicable)
1818
- [ ] I have made corresponding changes to the documentation (if applicable)
1919
- [ ] I have added tests that prove my fix is effective or that my feature works (if applicable)

.github/workflows/format-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
style: file
3232
files-changed-only: true
3333
tidy-checks: '-*'
34-
version: '15' # clang-format version
34+
version: '18' # clang-format version
3535
format-review: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'cpp-format-suggest') }}
3636
passive-reviews: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'cpp-format-suggest') }}
3737
file-annotations: true

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ When modifying C++ public APIs, update corresponding ctypes signatures in `openm
229229
- **Include order**: Related header first, then C/C++ stdlib, third-party libs, local headers
230230
- **Comments**: C++-style (`//`) only, never C-style (`/* */`)
231231
- **Standard**: C++17 features allowed
232-
- **Formatting**: Run `clang-format` (version 15) before committing; install via `tools/dev/install-commit-hooks.sh`
232+
- **Formatting**: Run `clang-format` (version 18) before committing; install via `tools/dev/install-commit-hooks.sh`
233233

234234
### Python Style
235235
- **PEP8** compliant
@@ -295,4 +295,4 @@ Check for optional features:
295295
2. **ID conflicts**: Python objects with duplicate IDs trigger `IDWarning`, use `reset_auto_ids()` between tests
296296
3. **MPI builds**: Code must work with and without MPI; use `#ifdef OPENMC_MPI` guards
297297
4. **Path handling**: Use `pathlib.Path` in new Python code, not `os.path`
298-
5. **Clang-format version**: CI uses version 15; other versions may produce different formatting
298+
5. **Clang-format version**: CI uses version 18; other versions may produce different formatting

docs/source/devguide/styleguide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ whenever a file is saved. For example, `Visual Studio Code
3030
support for running clang-format.
3131

3232
.. note::
33-
OpenMC's CI uses `clang-format` version 15. A different version of `clang-format`
33+
OpenMC's CI uses `clang-format` version 18. A different version of `clang-format`
3434
may produce different line changes and as a result fail the CI test.
3535

3636
Miscellaneous

include/openmc/volume_calc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class VolumeCalculation {
3434
vector<double> atoms; //!< Number of atoms for each nuclide
3535
vector<double> uncertainty; //!< Uncertainty on number of atoms
3636
int iterations; //!< Number of iterations needed to obtain the results
37-
}; // Results for a single domain
37+
}; // Results for a single domain
3838

3939
// Constructors
4040
VolumeCalculation(pugi::xml_node node);

src/mgxs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ Mgxs::Mgxs(const std::string& in_name, const vector<double>& mat_kTs,
365365
}
366366
}
367367
} // end switch
368-
} // end microscopic temperature loop
368+
} // end microscopic temperature loop
369369

370370
// Now combine the microscopic data at each relevant temperature
371371
// We will do this by treating the multiple temperatures of a nuclide as

0 commit comments

Comments
 (0)