Repository navigation
fix: low-hanging code quality fixes across the codebase - #8760
Conversation
- Fix missing `identifier =` assignment in InspectOutfile.cpp (bug) - Remove unreachable duplicate column check in InspectOutfile.cpp - Replace #ifndef/#define/#endif with #pragma once in GridBasedCluster.h and move it before includes - Fix comma-operator abuse in Param.cpp `:type` suffix check - Replace std::cerr with OPENMS_LOG_WARN in SignalToNoiseEstimator headers (MeanIterative and Median) - Clean up dead #if 0 block in FlagSet.cpp (header-only class) - Add missing headers to sources.cmake (FORMAT, HANDLERS, DATASTRUCTURES, FEATUREFINDER) - Remove duplicate entries in FORMAT/DATAACCESS sources.cmake - Remove commented-out .h entries and fix indentation in DATASTRUCTURES sources.cmake Co-Authored-By: Claude Opus 4.6 <[email protected]>
📝 WalkthroughWalkthroughThis PR updates CMake header/source lists (adds and removes public headers/sources), replaces std::cerr warnings with OPENMS logging in noise estimators, switches one header to Changes
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@src/openms/include/OpenMS/PROCESSING/NOISEESTIMATION/SignalToNoiseEstimatorMeanIterative.h`:
- Line 222: In SignalToNoiseEstimatorMeanIterative (the class in
SignalToNoiseEstimatorMeanIterative.h) replace the remaining std::cerr-based
sparse-window warning (the block around lines 353–358) with the OpenMS logging
macro OPENMS_LOG_WARN so it matches the earlier change and
SignalToNoiseEstimatorMedian; keep the original warning text and any variables
referenced (e.g. window size / sparse count) but send them to OPENMS_LOG_WARN <<
... << std::endl; LogStream is already included so no additional includes are
necessary.
🧹 Nitpick comments (1)
src/openms/include/OpenMS/FEATUREFINDER/sources.cmake (1)
18-20: Consider reorderingFeatureFinderDefs.hfor alphabetical consistency.
FeatureFinderDefs.hshould be placed afterFeatureFinderAlgorithmPickedHelperStructs.hto maintain alphabetical order. The file already has ordering inconsistencies elsewhere, so this is optional.
…stimatorMeanIterative Address CodeRabbit review feedback: the sparse-window warning on line 353 also used std::cerr instead of OPENMS_LOG_WARN. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Summary
identifier =assignment inInspectOutfile.cpp:117(expression result was discarded)InspectOutfile.cpp, dead#if 0block inFlagSet.cpp, commented-out.hentries in DATASTRUCTURESsources.cmake#ifndef/#define/#endifwith#pragma onceinGridBasedCluster.hand move it before#includedirectives (consistent with rest of codebase)Param.cpp:typesuffix checkstd::cerrwithOPENMS_LOG_WARNinSignalToNoiseEstimatorMeanIterative.handSignalToNoiseEstimatorMedian.hParamCWLFile.h,ParamJSONFile.h,ConsensusXMLHandler.h,FeatureXMLHandler.h,MatrixEigen.h,StringConversions.h,FeatureFinderAlgorithm.h,FeatureFinderDefs.h)MSDataTransformingConsumer.cppandMSDataWritingConsumer.cppentries in DATAACCESSsources.cmakeMassExplainer.cppin DATASTRUCTURESsources.cmakeTest plan
InspectOutfile_testpassesParam_testpassesGridBasedCluster_testandGridBasedClustering_testpassSignalToNoiseEstimatorMeanIterative_testandSignalToNoiseEstimatorMedian_testpassFlagSet_testpasses🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Refactor
Chores