gretard / sonar-sql-plugin

SQL language (T-SQL, MySQL, Snowflake, Vertica and PostgreSQL dialects) plugin for SonarQube
GNU General Public License v3.0
79 stars 21 forks source link

change readme pl/sql property #37

Closed mvhaasteren closed 11 months ago

mvhaasteren commented 1 year ago

Hi Greta, In the readme section "Using together with PLSQL plugin" you refer to the sonar.lang.pattern.sqlopen. We have teams who use the standard pl/sql plugin of sonarqube. So we tested this and I think that there is a small change in naming.

I think the property must now be:

sonar.lang.patterns.plsql

Supporting scanner log: [DEBUG] 14:54:26.592 Declared extensions of language PL/SQL were converted to sonar.lang.patterns.plsql : /*.sql,*/.pks,/*.pkb [DEBUG] 14:49:48.567 Declared extensions of language SQL were converted to sonar.lang.patterns.sql : */.db2z [DEBUG] 14:54:26.595 Declared extensions of language T-SQL were converted to sonar.lang.patterns.tsql : */.tsql

gretard commented 11 months ago

Hi,

Thanks for raising this. Checked and plugin works with "sonar.lang.patterns.plsqlopen". Maybe it is some other plugin causing this issue?

mvhaasteren commented 11 months ago

Well ... if you take a year to respond ... then of course things changed. We already corrected things on our side with the latest LTS version of sonarqube.

And also abanded this plugin, as maintaining rules in the application is not efficient as it requires a restart of sonarqube. We moved to a maven plugin with rules, rule exceptions and extra rule per team/schema as functions in the DB2 database. We use xpath power of DB2 to validate sql files. (Antlr is strong in converting sql to xml).

gretard commented 11 months ago

Thanks for the feedback. Will update documentation on how to use custom rules without having to restart sonar server as there is such an option.