Skip to content

Coverage not being reported when comment starts with --%param #1278

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

Open
fatihsahin364 opened this issue May 28, 2024 · 2 comments · May be fixed by #1297
Open

Coverage not being reported when comment starts with --%param #1278

fatihsahin364 opened this issue May 28, 2024 · 2 comments · May be fixed by #1297
Assignees
Labels

Comments

@fatihsahin364
Copy link

I installed utPlSql on my computer. I am currently using Allround PL/SQL Developer. When I add a parameter definition as a comment like this -- %param into my source code (not a test suite package), utplsql checks this package and thinks as a test suite/package and inserts this info into the ut_suite_cache_package table.
When I run the test suite there is no problem. But when I want to see the coverage result, I cannot see the package which contains --%param keywords on the coverage result page. After inspecting ut_suite_manager.save_object_cache procedure, I see the "a_suite_items IS NOT NULL AND a_suite_items.count = 0" if clause but when I check the parameters, the a_suite_items parameter is null when the source code doesn't contain any %suite or others special keywords.
After updating the if clause like this "IF a_suite_items IS NULL OR (a_suite_items IS NOT NULL AND a_suite_items.count = 0) THEN" and compiles my non-test suite package and then runs the test suite, it deletes the related line from the ut_suite_cache_package table and shows the package name correctly on the coverage result page.

@jgebal asked me to open this issue after a short conversation with him on Slack.

version info
v3.1.14.4197
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

@lwasylow lwasylow self-assigned this May 28, 2024
@lwasylow lwasylow added the bug label May 28, 2024
@lwasylow
Copy link
Member

Thank you for reporting this.
We will look into this.

@saerdnarelleom
Copy link

The problem is relevant because the combination of two hyphens and a percent sign can easily arise when using pldoc in PL/SQL Developer. A commented line with a % as a prefix for a documentation attribute can look exactly like a utPLSQL annotation (You better use block comments for that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants