Hi Team,
We have users reporting about the rule plsql:DeleteOrUpdateWithoutWhereCheck is throwing false positives for below attached screenshot code snippet
Justification: Delete does not need a where clause when used in cascade delete functionality In DDL scripts.
Please guide
Colin
(Colin)
April 5, 2022, 8:10am
#2
Hey there.
Make sure to read this post before raising a thread in this category:
Hey SonarSource Community!
False-positives happen , as do false-negatives, and we’re eager to fix them. We are thrilled when our users report issues so that we can make our products better.
What is a false-positive (FP)?
A false-positive is when an issue is raised unexpectedly on code that should not trigger an issue, or where the suggested action doesn’t make any sense for the code.
What is a false-negative (FN)?
A false-negative is when an issue should be raised on a piece of code, but isn…
Specifically – we are missing what product you’re using (A specific version of SonarQube, SonarCloud), and a self-conatined snippet of code that reproduces the issue (not a screenshot).
Hi Colin,
I have updated the summary to include the SoanrQube version which is 8.9.6 Enterprise LTS.
And snippet is below
ALTER TABLE "app_public"."PartnerUserInvite"
ADD COLUMN "status" text,
ADD COLUMN "role" text[],
ADD COLUMN "userId" uuid REFERENCES app_public."User" ON UPDATE CASCADE ON DELETE CASCADE,
ADD COLUMN "accountId" uuid REFERENCES app_public."PartnerAccount" ON UPDATE CASCADE ON DELETE CASCADE
;
Please let us know if any feedback received
Hi Colin,
Please let us know if any updates on this
Regards
Thanks for raising this @jagadeesh2 . We expect to be able to investigate it in the next few weeks.
After we confirm it is a problem, we will share here a link to the ticket we will create.