Trivadis / plsql-cop-cli

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

False postive for G-3120 when using star `*` #19

Closed PhilippSalvisberg closed 8 months ago

PhilippSalvisberg commented 9 months ago

A violation of G-3120 is reported in the following case:

select count(*) as synonym_count -- G-3120
  from all_synonyms s
  join user_objects o
    on o.object_name = s.table_name
 where s.owner = 'PUBLIC';

A prefix for * is not possible in this case. In other cases, it's not possible to use * without an alias prefix. We should therefore exclude the check for all column wildcard expressions.

PhilippSalvisberg commented 8 months ago

closed with Azure DevOps commit