BUILD-11718: reach 100% code coverage on config-poetry - #318
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to bring config-poetry to 100% code coverage by ensuring SonarCloud tracks the extracted action scripts and by extending ShellSpec coverage for previously untested branches in the config-poetry scripts.
Changes:
- Add
config-poetrytosonar.sourcesso SonarCloud includes it in analysis and coverage tracking. - Extend
spec/config-poetry_spec.shwith new examples covering env/output writes, error-tolerant JFrog config removal, sourcing guards, andmain()execution paths.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| spec/config-poetry_spec.sh | Adds ShellSpec examples to cover additional branches in configure_poetry_repox and poetry_set_project_version (including main() and environment/output writes). |
| sonar-project.properties | Adds config-poetry to SonarCloud’s sonar.sources list so coverage is tracked for that directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add config-poetry to Sonar sources and extend ShellSpec tests to cover poetry_set_project_version sourcing, main(), provided versions, and GITHUB_ENV/GITHUB_OUTPUT writes.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
53ef8fc to
d471feb
Compare
|
Code Review ✅ ApprovedIntegration of config-poetry into sonar-project.properties and expanded test coverage for entrypoint, output writes, and JFrog configuration logic ensures 100% code coverage. No issues found. OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |



Summary
config-poetrytosonar-project.propertiesso SonarCloud tracks coverage for the extracted action scriptsspec/config-poetry_spec.shto cover previously untested paths inpoetry_set_project_version.sh:main()entrypointCURRENT_VERSION/PROJECT_VERSIONshortcutGITHUB_OUTPUTandGITHUB_ENVwritesjf config remove) and Poetry credential export inconfigure_poetry_repox()JIRA: https://sonarsource.atlassian.net/browse/BUILD-11718
Test plan
shellspec spec/config-poetry_spec.shpasses locally (15 examples)Test Shell Scriptsworkflow passes and SonarCloud reports 100% coverage onconfig-poetry