Trivadis / plsql-cop-cli

db* CODECOP Command Line
Other
24 stars 1 forks source link

Do not report G-8210 violations for views owned by SYS #18

Closed PhilippSalvisberg closed 5 months ago

PhilippSalvisberg commented 6 months ago

The following code throws a violation of G-8210:

begin
   <<demo>>
   for r in (
      select synonym_name, table_owner, table_name
        from sys.user_synonyms -- G-8210 should not be thrown in this case
   )
   loop
      sys.dbms_output.put_line(r.synonym_name); -- prefixed according G-7510
   end loop demo;
end;
/

Even if sys objects are not mentioned in G-8210 it would make sense to allow the prefix for views and tables owned by SYS for example to ensure that the original object is used.

PhilippSalvisberg commented 5 months ago

fixed with Azure DevOps commit