Highlighting the area of G-7460 violations is too extensive for standalone functions
PhilippSalvisberg opened this issue · comments
Violations of G-7460 are reported in the following cases:
create or replace package body pkg is
function f return integer is
begin
return 1;
end f;
end pkg;
/
create or replace function f return integer is
begin
return 1;
end f;
/
That's ok. However, the highlighted area which becomes visible in the "Code Excerpt" in the db* CODECOP reports or in the highlighted area in the SQL Developer extension or in SonarQube is too extensive.
Here is the screenshot for the violation in the package function:
And here is the screenshot for the violation in the standalone function:
The reported scope should be the same for standalone functions as for package functions.
The underlying plsql grammar does not provide an object for the standalone function signature. However, in that case, we can highlight the function name. This should be good enough. G-7410 reports the issues the same way.
closed with Azure DevOps commit