Skip to content

TheBill2001/vscode-clazy

Repository files navigation

Clazy for VSCode

VSCode extension for Clazy.

Features

  • Lint files.
  • Quick fixes.
  • Show link to Clazy check's document.

screenshot.png

Downloads

You can download the extension from GitHub release page, or from:

Requirements

This extension requires clazy-standalone binary. You can find the build instruction here, or download from your distro's repo. Additionally, clazy-standalone requires a compilation database JSON file to work, i.e. CMake's -DCMAKE_EXPORT_COMPILE_COMMANDS=ON.

Extension Settings

The main configuration options:

  • clazy.executable: Path to Clazy standalone executable. Default is clazy-standalone.
  • clazy.checks: Array of clazy checks. Default are level0 and level1.
  • clazy.buildPath: Path to the build folder. This folder should be where the compilation database JSON file locates at.

Tip

When no build path is specified, a search for compile_commands.json will be attempted through all parent paths of the source file by Clazy. In such case, you can make a copy, symbolic link of the compilation database to the workspace folder. The CMake Tools extension allow such operation via cmake.copyCompileCommands option.

  • clazy.lintOnSave: Automatically lint files when they are saved. Default is true.

Note

None of the options support variable substitution as VSCode does not provide any public API for such task.

Related project