Is your code ready for a different database version?
There are many cases in which you would like to be sure your code is ready to be used for different dabase versions. For example, before upgrade to a new version, you want to check if you are using deprecated functions. Or maybe you are doing new developments and want to test backwards compatibility.
You can now simplify the task running the analysis for the different IRIS and Caché database versions, so you will get the failing code before you start to test.
objectscriptQuality allows you to select the database version for the analysis so you can find following issues among others:
- Class not found
- Method not found
- Method uses too many variables
- Method with unexpected arguments
- Missing argument(s) in method call
- Property not found
Define your database version in sonar.properties
You can define the version you want to analyze in the properties file, in the following way:
... sonar.objectscript.codeVersion=2021.1
Define your database version on your analysis call
When invoking your analysis from command line (or from your CI server, like Jenkins), you can include following parameter to define the database version you want to use:
-Dsonar.objectscript.codeVersion=2020.1
Define your database version in SonarQube
Instead using the properties file, you can define the version used for your project in SonarQube.
To do so, select your project and General Settings on Project Settings menu.
Then, on tab Objectscript Code Quality and Security, select the version of code you want to test against:
Define your default database version in SonarQube
If all your projects or most of them are using the same database version, you can configure it by default
To do so, in the main menu select Administration. Then, on tab Objectscript Code Quality and Security, select the version of code you want to test against by default: