Conversation
|
|
SonarCloud is reporting "issues" that were already present in the code, it has only now been triggered due to the repository-wide reformat. What do you suggest @1a1a11a? |
I'm facing similar problem, I checked the reported issue closely and I'm pretty sure that there won't be a problem. |
|
Maybe we can suppress the warning? |
I guess configuring the CI platform is needed to suppress the warning :) |
There was a problem hiding this comment.
Pull Request Overview
This PR activates and enforces the clang-tidy formatter across the entire C/C++ codebase, reformatting all affected files for style consistency and fixing a script typo in the install helper.
- Expanded CI to include all C/C++ files and run clang-tidy
- Reformatted nearly every source file: wrapped long lines, aligned parameters, standardized include ordering
- Corrected a variable reference typo in the install script
Reviewed Changes
Copilot reviewed 181 out of 260 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/test_profilerLRU.c | Wrapped array initializer and test call arguments across lines |
| test/test_prefetchAlgo.c | Wrapped helper signature and test calls across lines |
| test/test_mrcProfiler.cpp | Reformatted includes and test function calls for clang-tidy |
| test/test_glcache.c | Reformatted helper and printf calls |
| test/test_evictionAlgo.c | Reformatted helper signature and multi-size simulation calls |
| test/test_dist.c | Reformatted test registration calls |
| test/test_dataStructure.c | Reformatted test registration call |
| test/test_admissionAlgo.c | Reformatted helper signature and test logic |
| test/test_MRC.c | Reformatted comment blocks and includes |
| test.c | Removed duplicate include and fixed include order |
| scripts/install_libcachesim.sh | Fixed typo in SOURCE variable reference |
| random/allocator.c | Reformatted includes and inline functions |
| libCacheSim/utils/mymath.c | Moved set_rand_seed definition and reformatted linear_regression |
| libCacheSim/utils/include/mysys.h | Removed trailing whitespace |
| libCacheSim/utils/include/myprint.h | Removed trailing whitespace |
| libCacheSim/utils/include/mymath.h | Reformatted function declaration |
| libCacheSim/utils/dep/mem.c | Reformatted mmap calls and allocator logic |
| libCacheSim/traceReader/sampling/spatial.c | Removed duplicate include and reformatted else block |
| libCacheSim/traceReader/sampling/SHARD.c | Reformatted conditional sampling logic |
| libCacheSim/traceReader/reader.c | Reformatted setup and verbose logging calls |
| libCacheSim/traceReader/generalReader/zstdReader.c | Reformatted decompress and read functions |
| libCacheSim/traceReader/generalReader/txt.c | Reformatted verbose logging and error messages |
| libCacheSim/traceReader/generalReader/libcsv.h | Reformatted macro definitions |
| libCacheSim/traceReader/generalReader/libcsv.c | Reformatted error messages array |
| libCacheSim/traceReader/customizedReader/vscsi.h | Reformatted conditional cmd checks |
| libCacheSim/traceReader/customizedReader/valpinBin.h | Reformatted function definitions |
| libCacheSim/traceReader/customizedReader/oracle/oracleTwrNSBin.h | Reformatted conditional reuse logic |
| libCacheSim/traceReader/customizedReader/oracle/oracleTwrBin.h | Reformatted conditional reuse logic |
| libCacheSim/traceReader/customizedReader/oracle/oracleGeneralBin.h | Reformatted conditional skip logic |
| libCacheSim/traceReader/customizedReader/lcs.h | Reformatted struct assertions |
| libCacheSim/traceReader/customizedReader/lcs.c | Reformatted error and summary prints |
| libCacheSim/traceReader/customizedReader/binaryUtils.h | Reformatted read_bytes function |
| libCacheSim/traceAnalyzer/utils/utilsSys.cpp | Reformatted includes and affinity prints |
| libCacheSim/traceAnalyzer/utils/utils.cpp | Added missing include and formatted includes |
| libCacheSim/traceAnalyzer/utils/threadPool.cpp | Reformatted shutdown and wait logic |
| libCacheSim/traceAnalyzer/utils/include/utilsSys.h | Removed trailing whitespace |
| libCacheSim/traceAnalyzer/utils/include/utilsStr.h | Reformatted include order |
| libCacheSim/traceAnalyzer/utils/include/utilsPrint.h | Reformatted printing functions |
| libCacheSim/traceAnalyzer/utils/include/utilsMath.h | Reformatted math utilities |
| libCacheSim/traceAnalyzer/utils/include/utilsCompress.h | Reformatted gzip compress/decompress |
| libCacheSim/traceAnalyzer/utils/include/threadPool.h | Reformatted thread pool header |
| libCacheSim/traceAnalyzer/utils/include/linReg.h | Reformatted linreg implementation |
| libCacheSim/traceAnalyzer/struct.h | Removed trailing whitespace |
| libCacheSim/traceAnalyzer/reuse.h | Reformatted constructor parameters |
| libCacheSim/traceAnalyzer/reqRate.cpp | Removed trailing whitespace |
| libCacheSim/traceAnalyzer/plotData/heatmapData.h | Reformatted inline functions and array initialization |
| libCacheSim/traceAnalyzer/op.h | Reformatted include order |
| libCacheSim/traceAnalyzer/experimental/sizeChange.h | Reformatted includes |
| libCacheSim/traceAnalyzer/experimental/scanDetector.h | Reformatted conditional loops |
| libCacheSim/traceAnalyzer/experimental/createFutureReuseCCDF.h | Reformatted includes |
| libCacheSim/traceAnalyzer/dep/writeReuse.h | Reformatted assertions and I/O logic |
| libCacheSim/traceAnalyzer/dep/writeFutureReuse.h | Reformatted reuse logic and I/O operations |
| libCacheSim/traceAnalyzer/analyzer.h | Reformatted initializer lists |
| libCacheSim/traceAnalyzer/analyzer.cpp | Reformatted includes and extra include |
| libCacheSim/traceAnalyzer/accessPattern.h | Removed trailing whitespace |
Comments suppressed due to low confidence (1)
scripts/install_libcachesim.sh:5
- The closing brace in "$SOURCE}" is mismatched; it should be either ${SOURCE} or simply $SOURCE to correctly reference the variable.
DIR=$(dirname $SOURCE})
1685aa9 to
f2116a5
Compare
|
I am expecting to fix all the relative import after the cmake clean up. It may change and reformat a lot of files, which may cause a conflict with this PR. What is the current status of this PR? |
The PR is out of sync with the main branch due to recent changes... might be best to delay a repository-wide refactor after major changes have been made. |
|
This should have been fixed in #203, please let us know if there are more errors from clang-format. |




Issue
The
code-quality.yamlincludes aclang-tidyformatter that has not been run previously due to its configuration.Fix
clang-tidyformatter