felipebz / zpa

Parser and static code analysis tool for PL/SQL and Oracle SQL.
https://zpa.felipebz.com
GNU Lesser General Public License v3.0
211 stars 77 forks source link

Rule 'VariableHiding' - exception entries not included #180

Closed khirzer closed 7 months ago

khirzer commented 7 months ago

Hi!

The rule 'VariableHiding' does not create an issue for user-defined exception 'customExc' (see code below). An issue for variable 'numberVar' is created.

create or replace package body TestPackage is

procedure test is

  numberVar number;
  customExc exception;

  procedure testNested is
    numberVar number;
    customExc exception;
  begin
    null;
  end testNested;

begin
  null;
end test;

END TestPackage;

Used zpa version: 3.2.0

In zpa version 3.1.1 the rule works as expected.

Could you please take a look at this? Thank you very much!

felipebz commented 7 months ago

Hi @khirzer,

Thank you for reporting this issue. It was caused by a change in the way we handle user-defined exceptions in version 3.2.0+.