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

Integration with sonar-sql-plugin #155

Closed fyrie6870 closed 2 years ago

fyrie6870 commented 2 years ago

Hey,

The plugin works great. I was wondering if there is a possibility of this plugin working alongside sonar-sql-plugin

I integrated both and during scan I get this error: image

Sonarqube version: 8.9.5 LTS Sonar scanner CLI: 4.6.2.2472

Thanks

felipebz commented 2 years ago

Hi!

There's no image on your post so I don't know exactly what error you're facing. 😅 I suppose that's because both plugins are trying to analyze the same file.

ZPA only supports Oracle SQL code and the sonar-sql-plugin doesn't support the Oracle dialect. You'll need to adjust the "File Suffixes" property accordingly to the dialect you want to analyze.

If you want to analyze Oracle .sql files with ZPA you could set these properties:


sonar.zpa.file.suffixes=sql```

By doing this the sonar-sql-plugin will ignore the .sql files.

If you want to analyze other dialects (like TSQL or MySQL), set:

```sonar.sql.file.suffixes=.sql
sonar.zpa.file.suffixes=```

So the file will be ignored by ZPA. 
fyrie6870 commented 2 years ago

I apologize, Here is the image: image

and thanks for the tips!