← 输入框|github.com|刷新
Skip to content

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

Closed

Description

@fatihsahin364

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

Activity

  1. self-assigned this
    on May 28, 2024
  2. lwasylow commented on May 28, 2024

    @lwasylow
    Member

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

  3. saerdnarelleom commented on Jul 15, 2024

    @saerdnarelleom

    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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions