Getting all new code .sql files in SonarCloud to be treated as T-SQL


(David Clifford) #1

Hi
We have .sql files within our code which are used for Microsoft SQL. SonarCloud by default treats these as pl/sql which to my understanding is used with Oracle so I believe these should be treated as t/sql. I can change this behaviour per project by changing the file extension of t/sql to .sql and remove .sql for pl/sql. Can I make this change default for all my projects? Also I have 1 project that errors if using t/sql but is fine for pl/sql so I need to understand what is going on here.
Thanks


(Fabrice Bellingard) #2

You don’t have a way to override this globally. The easiest you can do is to add the following in the sonar-project.properties file of all your projects:

sonar.tsql.file.suffixes=.sql
sonar.plsql.file.suffixes=.plsql