09 CABL - Riverside-Software/workshop GitHub Wiki
-
CABL (Code Analyzer for ABL) is a tool developed by Riverside Software that reports bugs, vulnerabilities, and other bad practices in your source code. It requires a license to execute the full set of rules. Without a license, CABL will only execute sample rules from the commercial set, such as detecting unused variables.
Starting in August 2024, CABL will be available as a separate VS Code extension. You can download the latest version's VSIX file here. To install it, execute the "Install VSIX file" action in VS Code and select the downloaded file. Note that the extension will also be available on the VS Code marketplace later this year.
-
Once installed, the SonarLint welcome screen will appear:
-
To configure the connection to your SonarQube server, follow these steps:
- Open the "SonarLint CABL" view.
- Click on the "Add SonarQube Connection" button.
Please note that SonarCloud connection is not supported for ABL and will not be supported in the future.
-
We'll use a SonarQube instance hosted by Riverside Software. Enter
https://sonar3.riverside-software.fr
in the Server URL field, then click on the "Generate token" button. This action will open a web browser pointing to the SonarQube server URL. Useworkshop
as the username; the password will be provided during the workshop. If authentication is successful, you'll see an "Allow SonarLint connection" screen. -
Click on the "Allow connection" button. The token box in the VS Code window will be automatically filled. Finally, click on the "Save connection" button to complete the setup.
-
Now that the SonarQube connection is set up, we'll attach the current project to the SonarQube project. This will automatically retrieve the quality profile (i.e., the rules executed on the ABL code), the settings, and all issues flagged as false positives or "won't fix" so they don't appear in VS Code. Click on the "+" icon next to the SonarQube server name to proceed.
-
The SonarQube instance used for this workshop contains only a single project. Select this project, and a message will confirm that the current project is now bound to it.
-
Opening any ABL source file will now trigger CABL rules to execute on-the-fly. For example: