refactor(ci): satisfy the shell analysis the way SonarCloud asks, not around it - #53
Merged
Merged
Conversation
… around it SonarCloud flagged the helper on two counts, both fair for a bash script that is sourced into a bash workflow step: - `[` over `[[`. The script runs under bash (`#!/usr/bin/env bash`, and the workflow sources it into a bash step), so `[[` is strictly the better construct: no word splitting, no pathname expansion, and a `-eq` that cannot be talked into a string comparison. - Diagnostics on stdout. The `::error::` annotations now go to stderr. GitHub Actions reads workflow commands from either stream, so the annotations are unchanged; what changes is that a failure message no longer lands in a caller's captured stdout. Behaviour is unchanged and re-verified against the same real failure modes after the edit: a good download with the matching checksum passes, an empty body is refused with its message on stderr, an HTTP 404 still fails, and the pin test that guards the wiring still passes 123/123.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches📝 Generate docstrings
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 |
|
14 tasks
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.



SonarCloud flagged the helper in #51 after that PR merged (the analysis ran late). Both
findings are fair for a script that is sourced into a bash workflow step:
[over[[— the script is bash (#!/usr/bin/env bash, and the step sources itinto bash), so
[[is strictly better: no word splitting, no pathname expansion, anda
-eqthat cannot be talked into a string comparison.::error::annotations now go to stderr. GitHubActions reads workflow commands from either stream, so the annotations are unchanged;
what changes is that a failure message no longer lands in a caller's captured stdout.
Behaviour is unchanged, and I re-verified it after the edit against the same real
failure modes rather than trusting the diff: a good download with the matching checksum
passes, an empty body is refused with its message on stderr, and an HTTP 404 still fails.
The pin test that guards the wiring passes 123/123;
check-formatandcheck-spdxare clean.
Nothing is skipped or suppressed to make the analysis green — the tool's advice and the
script's behaviour agree here, so the script changed.