Skip to content

CLI Integration

The CLI is bundled with the VS Code extensions. The check and the test commands can be run directly from the UI, eliminating the need for manual input. This feature is only available with an Essential or Professional Subscription.

The CLI integration is activated either when you run a check or when you open the dbLinter view container.

Clicking on the dbLinter symbol

dbLinter symbol

in the activity bar opens the dbLinter view container. COMMAND LINE is the second view in this container.

CLI Activated

To check all the files in the workspace, right-click on Check in the view and select Check Workspace. Alternatively, click the run button to the right of the top-level entry Check.

CLI Check

This action opens a terminal window and runs the check command inside it.

CLI Check Terminal

Once the check command has been completed, the Check Report is opened.

CLI Check Report

The following outputs are produced and accessible in the Command Line view.

Output NameFile Name in .dblinterDescription
Check Reportcheck.vscode.mddbLinter Check Report as Markdown.
SonarQube Generic Issue JSONcheck.sonarqube.jsonSonarQube Generic formatted issue report to import issues in any SonarQube edition without any plugin.
SARIF Logcheck.sarif.sarifStatic Analysis Results Interchange Format (SARIF) to visualise issues in various tools. See also Viewers.
Checkstyle Audit Reportcheck.checkstyle.xmlCheckstyle XML report.
GitHub Actions Workflow Command Annotationscheck.github.txtWorkflow commands for GitHub Actions. These commands (annotations) are interpreted when printed to stdout.
GitLab Code Quality Reportcheck.gitlab.jsonGitLab quality report.
Check Logcheck.logThe dbLinter log file.

To run all SQL-based tests, right-click on Test in the view and select Test Workspace.

CLI Test

This action opens a terminal window and runs the test command inside it.

CLI Check Terminal

Once the test command has been completed, the Test Report is opened.

CLI Test Report

The following outputs are produced and accessible in the Command Line view.

Output NameFile Name in .dblinterDescription
Test Reporttest.vscode.mddbLinter Test Report as Markdown.
JUnit XML Reporttest.junit.xmlJUnit XML Report.
Test Logtest.logThe dbLinter log file.