SonarCloud cannot read .up.sql files

Hello,
Before jumping into the issue let me share our information:

  • ALM used Github
  • CI system used Github Actions
  • Languages of the repository: SQL
  • CI-based analysis

This project only has SQL files. However, we cannot get an analysis for .sql files.

It is kind of a migration project and it includes .up.sql and .down.sql files.
We update the database through migrations.

We set CI-based analysis and .properties file has the line below:

sonar.plsql.file.suffixes=.up.plsql

All .up.sql and .down.sql files are in a folder. So I set:

sonar.sources= {folder-name}/

When I go to Code tab in any PR or Main Branch page, I cannot see the .up.sql and .down.sql files.

How can I set the configurations properly?

ps. It says the automatic analysis is not recommended in General Settings > Analysis Method

Hi,

It’s difficult to know for sure without your analysis logs. But at a guess, having two . in the extension is confusing the mechanism…?

I would set the file suffix to .sql and then use exclusions to omit the .downl.sql files.

 
HTH,
Ann

Thank you @ganncamp :+1: