xgrep in VS Code
Install the Mondoo VS Code extension and get xgrep diagnostics with zero Language Server configuration.
xgrep in VS Code
In VS Code there's nothing to wire up: install the
Mondoo extension
and, with the xgrep binary on your PATH, it starts and manages the Language Server
for you — no LSP client to register, no command to configure.
Setup
- Install xgrep so the
xgrepbinary is on your PATH. - Install the Mondoo extension from the VS Code Marketplace (or run
code --install-extension Mondoo.vscode-mondoo).
That's it. The extension launches xgrep lsp automatically and starts reporting
diagnostics and quickfixes as you open and edit files.
Commands
The extension adds palette commands for the project-wide and changed-files scans:
- xgrep: Scan Workspace — scan the whole project; findings stream into the Problems panel as each file finishes.
- xgrep: Scan Changed Files — scan only what changed in the git working tree.
Settings
The mondoo.xgrep* settings let you point at a specific binary, run a custom rule pack,
or turn the integration off:
- the path to the
xgrepbinary, - a custom rule pack to run instead of the built-ins, and
- an opt-out toggle to disable xgrep in the editor.
Developing against an unreleased build
To try a locally built xgrep before it ships, use the in-repo test harness at
test/vscode-lsp/, which runs a locally built binary in an Extension Development Host
window (see its README).