Blue Pearl Solutions VS Code Integration
This VS Code extension integrates Blue Pearl Solutions (BPS) HDL linting directly into your development workflow. Lint your Verilog, SystemVerilog, and VHDL files and view results inline in the editor, the Problems panel, and the Blue Pearl Issues panel.
Features
- Lint current file — run Blue Pearl linting on the currently open HDL file
- Lint workspace — lint all HDL files in your workspace in a single pass
- SARIF-driven diagnostics — squiggles and Problems panel entries are populated directly from the SARIF output produced by BluePearlCLI, giving accurate line and column positions
- Run configuration panel — select check packages, HDL language versions, and FPGA target through a dedicated editor tab; no manual TCL editing required
- Automatic pass selection — the extension determines whether to run
BPS::run load or BPS::run analyze based on the packages you select
- Issues panel — a dedicated sidebar panel lists all issues by rule ID with one-click navigation to the offending line
- SARIF output — produces
.bluepearl/Results/results.sarif after each run, compatible with the Microsoft SARIF Viewer extension and Jenkins Warnings Next Generation plugin
- Lint on save — optionally run linting automatically when saving HDL files
Prerequisites
- Blue Pearl Solutions Visual Verification Environment installed and accessible from the command line
- VS Code 1.120.0 or higher
Installation
Build the extension:
npm install
npm run compile
Package the extension:
npx vsce package
Install the .vsix file:
- Open VS Code
Ctrl+Shift+P → Extensions: Install from VSIX
- Select the generated
.vsix file
- Click Reload Window when prompted
The Microsoft SARIF Viewer extension is installed automatically alongside this extension.
Configuration
Run configuration panel
Open the configuration panel via Ctrl+Shift+P → Blue Pearl: Open Configuration, or click the settings gear in the Blue Pearl sidebar.
The panel has three tabs:
Project — top-level module, design library, VHDL standard, Verilog/SystemVerilog standard, and FPGA vendor/version. The analysis pass banner updates live to show whether BPS::run load -forceload or BPS::run analyze -forceload will be used.
Packages — select from the full catalogue of Blue Pearl Solutions check packages, grouped by category. Each package shows its check count and whether it requires a load or analyze pass. Use the select all toggle per group for quick selection.
Advanced — waivers, SARIF output toggle, individual check overrides (for expert users who know specific check IDs), and a legacy BPS::set_msg_check_package override.
Configuration is saved to .bluepearl/runconfig.json in your workspace, which can be committed to source control so the whole team shares the same settings.
VS Code settings
The following settings are available under File → Preferences → Settings, search for "Blue Pearl":
| Setting |
Default |
Description |
bluepearl.executablePath |
BluePearlCLI |
Path to the BluePearlCLI executable |
bluepearl.tclScriptPath |
${workspaceFolder}/bluepearl_vscode_lint.tcl |
Path to a custom TCL script (leave as default to use generated script) |
bluepearl.lintOnSave |
false |
Run linting automatically on file save |
bluepearl.additionalArgs |
[] |
Additional command-line arguments for BluePearlCLI |
bluepearl.sarif.enabled |
true |
Write results.sarif after each run |
bluepearl.designLibrary |
work |
Default HDL work library name |
bluepearl.enableWaivers |
true |
Load waivers.xml if present in workspace root |
If bluepearl.executablePath is not on your system PATH, specify the full path:
{
"bluepearl.executablePath": "/path/to/BluePearlCLI"
}
Usage
Command palette
Ctrl+Shift+P and type:
- Blue Pearl: Open Configuration — open the run configuration panel
- Blue Pearl: Lint Current File — lint the currently open HDL file
- Blue Pearl: Lint Workspace — lint all HDL files in the workspace
- Blue Pearl: Clear Diagnostics — clear all Blue Pearl diagnostics
Editor integration
- A Blue Pearl icon appears in the editor toolbar when an HDL file is open — click it to lint the current file
- Right-click in an HDL file for Blue Pearl: Lint Current File and Blue Pearl: Clear Diagnostics
- Right-click an HDL file in the Explorer for Blue Pearl: Lint Current File
Click the Blue Pearl icon in the Activity Bar to open the sidebar, which shows current configuration and quick-access action buttons.
Keyboard shortcut (optional)
Add to keybindings.json:
[
{
"key": "ctrl+shift+b",
"command": "bluepearl.lintCurrentFile",
"when": "editorLangId =~ /verilog|systemverilog|vhdl/"
}
]
How it works
- When a lint run is triggered, the extension reads
.bluepearl/runconfig.json and generates .bluepearl/vscode_analysis.tcl and .bluepearl/input_files.f
- BluePearlCLI is invoked with
-tcl .bluepearl/vscode_analysis.tcl -output .bluepearl/Results -write_sarif
- After the run completes, the extension reads
.bluepearl/Results/results.sarif and populates VS Code diagnostics (squiggles, Problems panel, Issues panel)
- If SARIF is disabled, the extension falls back to parsing
bluepearl.log
The generated TCL script disables all checks first (BPS::set_check_enabled * -enabled false), then enables each selected package (BPS::set_package_enabled {Package Name} -enabled true), and finally runs the appropriate analysis pass with -forceload.
Custom TCL scripts
If you need full control over the TCL script, place your own script at the path configured in bluepearl.tclScriptPath. When the file exists, the extension uses it as-is and does not generate a script from runconfig.json. Remove or rename the file to return to generated scripts.
Project structure
bps_vscode/
├── images/
│ ├── iconLarge.png # Extension marketplace icon
│ └── icon.svg # Activity bar icon
├── src/
│ ├── extension.ts # Entry point and command registration
│ ├── logParser.ts # SARIF and log file parsing
│ ├── tclGenerator.ts # TCL script and .f file generation
│ ├── runConfigPanel.ts # Run configuration webview panel
│ ├── models/
│ │ ├── runConfig.ts # RunConfig interface and defaults
│ │ └── packages.ts # BPS package catalogue
│ └── providers/
│ ├── explorerProvider.ts # Sidebar tree provider
│ └── issuesProvider.ts # Issues panel tree provider
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
└── README.md # This file
Development
# Install dependencies
npm install
# Compile once
npm run compile
# Watch mode (recompiles on save)
npm run watch
# Package for distribution
npx vsce package
Press F5 in VS Code to launch the Extension Development Host for interactive debugging.
Troubleshooting
Extension not activating — open an HDL file (.v, .sv, .vhd, etc.) to trigger activation. Check the Output panel (View → Output → Blue Pearl) for activation messages.
No squiggles appearing — check the Output panel after a run. It should report Parsed SARIF file: N bytes. If it reports Parsed log file instead, the extension is running an older compiled version — rebuild and reinstall.
BluePearlCLI not found — verify the executable is on your PATH (which BluePearlCLI) or set the full path in bluepearl.executablePath.
Packages not being applied — open .bluepearl/vscode_analysis.tcl after a run and verify it contains BPS::set_package_enabled lines. If not, check that .bluepearl/runconfig.json has a non-empty enabledPackages array and that you clicked Save Configuration in the panel.
Wrong TCL script being used — if a file exists at bluepearl.tclScriptPath, it takes precedence over the generated script. Delete or rename it to use the generated script.
License
GPL-3.0-or-later
Support
- Extension issues — raise an issue on the GitHub repository
- Blue Pearl Solutions — refer to the Blue Pearl Solutions documentation and support channels