VS Code Lizard

Run complexity analysis on your code.


Project maintained by brobeson Hosted on GitHub Pages — Theme by mattgraham

Getting Started

  1. Install Lizard on your system. The executable must be in your PATH.
  2. Install the extension through the VS Code marketplace. VS Code activates the extension when you open a C++ file.
  3. Configure your projects complexity limits in settings.json. VS Code Lizard disables the metrics by default. See Extension Settings for details.

Extension Settings

Running Complexity Analysis

VS Code Lizard runs complexity analysis when you save your file. If you need to manually run Lizard, you can use the command Lizard: Scan the Current File in the VS Code command palette. VS Code Lizard populates the Problems view with any results. It also attempts to highlight offending functions in the code with error squiggles.

Viewing Output

VS Code Lizard creates an output channel named “Lizard”. It prints the Lizard command and output to this channel.

The extension also reports issues as diagnostics in the Problems view. One function can have up to three diagnostics, one for each metric. VS Code Lizard breaks up the diagnostics this way so you know exactly what the complexity problems are with a particular function.

VS Code Lizard attempts to add warning squiggles in the text editor. Lizard only reports line numbers, so VS Code must try to examine the source code to figure out the columns that match the function name. Due to this, the squiggles might not line up exactly with the function, but they should be on the correct line.