[DNM] [multiple] Comprehensive shellcheck warning cleanup across scripts#3817
[DNM] [multiple] Comprehensive shellcheck warning cleanup across scripts#3817amartyasinha wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
Conversation
This commit addresses multiple categories of shellcheck warnings to significantly reduce noise in pre-commit logs, making it easier for developers to identify actual failuers in pre-commit job. Changes include: 1. Variable quoting fixes (SC2086): - Add quotes in nat64_appliance, update role, and all scripts - Prevents globbing and word splitting issues 2. Shell syntax improvements: - Fix getopts patterns (remove invalid + syntax) - Use ((...)) instead of 'let' expressions - Add -r flag to read commands - Fix variable assignment patterns to avoid masking return values 3. Shellcheck disables for legitimate cases with explanations: - OS release files: Don't exist in CI/dev environments - NAT64 config files: Generated at runtime in target environment - Python venv activate: Created dynamically by venv command 4. Remove unused variables (SC2034): - collection_path in run_ansible_test (never used) - RHT_PKG_MGR in setup_env (script uses dnf directly) All changes maintain functionality while making pre-commit output much cleaner and more actionable for developers. Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com> Signed-off-by: Amartya Sinha <amsinha@redhat.com>
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/57beb47cc0a1406d9b39b257844814b5 ❌ openstack-k8s-operators-content-provider RETRY_LIMIT in 2m 32s |
|
recheck |
|
Build failed (check pipeline). Post https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/1d1640118bdf43ffabca7cef7783565e ❌ openstack-k8s-operators-content-provider RETRY_LIMIT in 2m 27s |
This commit addresses multiple categories of shellcheck warnings to significantly reduce noise in pre-commit logs, making it easier for developers to identify actual failuers in pre-commit job.
Changes include:
Variable quoting fixes (SC2086):
Shell syntax improvements:
Shellcheck disables for legitimate cases with explanations:
Remove unused variables (SC2034):
All changes maintain functionality while making pre-commit output much cleaner and more actionable for developers.