Conversation
|
📄 Documentation for this branch is available at: https://ncar.github.io/musica/branch/227-const-correctness/ |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #669 +/- ##
==========================================
+ Coverage 78.24% 78.26% +0.02%
==========================================
Files 54 54
Lines 6857 6866 +9
==========================================
+ Hits 5365 5374 +9
Misses 1492 1492 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This pull request applies const correctness improvements across the codebase using clang-tidy's misc-const-correctness check. The changes add const qualifiers to local variables that are not modified after initialization, improving code safety and clarity.
- Applies
constqualifiers to immutable variables throughout the codebase - Improves code formatting in v1_parse.cpp for better readability
- Identifies one incorrect const application that would cause compilation issues
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/util.cpp | Added const to string and size_t variables used for error messages and index mapping |
| src/tuvx/tuvx.cpp | Added const to calculation results and count variables |
| src/tuvx/profile.cpp | Added const to string and numeric variables returned from internal functions |
| src/tuvx/grid.cpp | Added const to section count variable |
| src/test/unit/tuvx/tuvx_c_api.cpp | Added const to test dimension and stream count variables |
| src/test/unit/micm/parser.cpp | Added const to chemistry objects and expected test values |
| src/test/unit/micm/micm_wrapper.cpp | Added const to chemistry configuration and time step |
| src/test/unit/micm/micm_c_api.cpp | Added const to test parameters, indices, and calculated values |
| src/test/unit/component_versions.cpp | Added const to string length variable |
| src/test/unit/carma/carma_c_api.cpp | Added const to version strings and CARMA objects in tests |
| src/micm/v1_parse.cpp | Added const to gas_phase and parameters; improved formatting of builder chains |
| src/micm/v0_parse.cpp | Added const to index and parameter variables |
| src/micm/state_c_interface.cpp | Added const to error messages and map/size return values |
| src/micm/parse.cpp | Added const to version and error message variables |
| src/micm/micm_c_interface.cpp | Added const to chemistry configuration and string conversions |
| src/micm/micm.cpp | Added const to error message string |
| src/micm/cuda_availability.cpp | Incorrectly added const to device_count which is modified via pointer |
| src/micm/convert_v0_to_v1.cpp | Added const to parsed mechanism object |
| src/component_versions.cpp | Added const to string length variables |
| src/carma/carma_state.cpp | Added const to wavelength bin count |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Closes #227
I used clang-tidy to target our source folder