8000 SQSCANGHA-83 Avoid unbound variable error on parameter expansion by aleksandra-bozhinoska-sonarsource · Pull Request #192 · SonarSource/sonarqube-scan-action · GitHub
[go: up one dir, main page]

Skip to content

SQSCANGHA-83 Avoid unbound variable error on parameter expansion #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

aleksandra-bozhinoska-sonarsource
Copy link
Contributor
@aleksandra-bozhinoska-sonarsource aleksandra-bozhinoska-sonarsource commented May 16, 2025

SQSCANGHA-83

Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside SonarSource to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes. If you would like to see a new feature, please create a new thread in the forum "Suggest new features".

With that in mind, if you would like to submit a code contribution, make sure that you adhere to the following guidelines and all tests are passing:

  • Please explain your motives to contribute this change: what problem you are trying to fix, what improvement you are trying to make
  • Make sure any code you changed is covered by tests
  • If there is a JIRA ticket available, please make your commits and pull request start with the ticket ID (SONAR-XXXX)

We will try to give you feedback on your contribution as quickly as possible.

Thank You!
The SonarSource Team

Reproduced the unbound variable error in a dummy shell script on macos, and validated that the fix with the safe parameter expansion avoids it.
Code used in the test script:

scanner_args=()
set -ux
echo ${scanner_args[@]+"${scanner_args[@]}"}

Copy link
Member
@henryju henryju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a test we could add in qa-main.yml to demonstrate the issue and is fixed by this change, and be sure we don't introduce regression later?

Copy link
Member
@henryju henryju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aleksandra-bozhinoska-sonarsource aleksandra-bozhinoska-sonarsource force-pushed the bugfix/abozhinoska/SQSCANGHA-83/avoid-unbound-variable-error branch from 5e30146 to 495484a Compare May 16, 2025 14:52
@aleksandra-bozhinoska-sonarsource aleksandra-bozhinoska-sonarsource merged commit c8aa051 into master May 16, 2025
58 checks passed
@aleksandra-bozhinoska-sonarsource aleksandra-bozhinoska-sonarsource deleted the bugfix/abozhinoska/SQSCANGHA-83/avoid-unbound-variable-error branch May 16, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0