chore: clear a batch of Sonar findings#12
Merged
Merged
Conversation
- Discard unused size_t status from native free() calls and swallowed destructor throwables via unnamed variables `_` instead of `ignored` (S1854 / S1481 / S7467). - Exclude the benchmark module from Sonar analysis: it is a JMH harness, not shipped runtime, and its @Setup/@teardown lifecycle trips a false "resource not closed" report (S2095). - Reword the C-struct reference comments to prose so they are not parsed as commented-out code (S125). - Extract the repeated ZDICT field-name literals into constants (S1192). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Clears ~25 SonarCloud findings, no behaviour change.
ignored→ unnamed_— thesize_tstatus from nativefree()and swallowed destructorThrowables are intentionally discarded; unnamed variables say so and drop the dead-store/unused-local noise (S1854 ×8, S1481 ×8, S7467 ×3).@Setup/@TearDownlifecycle trips a false "resource not closed" (S2095). Already excluded from coverage.{...}shapes so they aren't parsed as commented-out code (S125 ×3).FIELD_NB_THREADS/FIELD_COMPRESSION_LEVELinstead of repeated literals (S1192 ×2).Deferred (separate concerns): S7474/S6213/S2187 (clash with documented
///-markdown +@Nestedconventions), S112 (throws Throwableis forced by FFMinvokeExact), S5443 (temp dir already owner-only), S7637 (workflow action SHA pinning — better via Dependabot), S3776 (a real refactor).Test
./mvnw -pl zstd,benchmark -am verify— 138 green, checkstyle + javadoc clean.🤖 Generated with Claude Code