Code-review cleanups: sources, CMake, CI#11
Merged
Conversation
- Data.C: read the per-record state bits into uint8_t instead of int8_t so extracting the 2-bit sensor codes no longer relies on implementation-defined right-shift of negative values; document the meaning of all four state codes (0/3 are intentionally skipped) - Sensors: remove dead mLength/length() (never read anywhere), which also drops a tellg() expression that underflowed on stream failure - SensorsMap.C: build the unknown-CRC exception message with string concatenation instead of a fixed snprintf buffer; drop a wrong-direction int cast when inserting into the size_t-valued map - Logger.H: fall back to spdlog's default logger if init fails twice, so logging callers can never dereference a null logger - CMake: stop double-linking spdlog and dbd_common into executables (PUBLIC links on dbd_common/dbd_netcdf already provide them); this silences "ignoring duplicate libraries" ld warnings on macOS; decompressTWR keeps a direct spdlog link since it avoids dbd_common - CI: include test/decompressTWR in the shellcheck lint step (it was the only test script not being checked) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Allow build/test/lint tooling, tree-local git operations, and running the project-built binaries without permission prompts. Outward-facing actions (git push, installs) still prompt. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #11 +/- ##
==========================================
- Coverage 63.04% 63.02% -0.03%
==========================================
Files 34 34
Lines 3412 3410 -2
Branches 423 424 +1
==========================================
- Hits 2151 2149 -2
Misses 1261 1261 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cleanups from a code review pass over the sources, build system, and CI. All changes are output-neutral: the integration tests diff converter output against the checked-in reference files and pass unchanged (31/31 locally on macOS, zero build warnings).
Source changes
uint8_tinstead ofint8_t, so extracting the 2-bit sensor codes no longer relies on implementation-defined right-shift of negative values (the& 0x03mask made the old code produce identical results on all supported compilers, but the standard didn't guarantee it). Documented the meaning of all four state codes — the silent skip of codes 0 (not sampled) and 3 (unused) previously read like a bug.mLength/length()— never read anywhere. Also eliminates atellg() - sposexpression that underflowed to a hugesize_tif the stream failed mid-parse.snprintfbuffer; drop a wrong-directionintcast when inserting into thesize_t-valued name map.init()fails twice, so the logging macros can never dereference a null logger.Build / CI
spdloganddbd_commoninto executables — thePUBLIClinks ondbd_common/dbd_netcdfalready provide them transitively. Silences theld: ignoring duplicate librarieswarnings on every macOS build.decompressTWRkeeps its direct spdlog link since it deliberately avoidsdbd_common.test/decompressTWRin the shellcheck lint step — it was the only test script not being checked (verified it passes shellcheck).Test plan
Release, AppleClang): zero warningsctest: 31/31 passing, including reference-file comparison integration tests for all five toolsshellcheck -s sh test/decompressTWRpasses locally🤖 Generated with Claude Code