Analysis Configuration
Qlty’s static analysis is highly configurable to maximize the relevancy of your results. Project configuration is through a qlty.toml
file which is committed into your Git repository as .qlty/qlty.toml
.
If your repository does not have a .qlty/qlty.toml
file, Qlty Cloud will automatically
generate a basic configuration before analysis. However, we strongly recommend checking in a
.qlty/qlty.toml
to enable customization.
If you have the Qlty CLI installed, you can generate an initial configuration by running qlty init
. This will look at the file types and configuration files in your repository to generate a baseline configuration.
Alternatively, you can write your .qlty/qlty.toml
file by hand. Here is a minimal starting point that you can check in:
This configuration will analyze all supported languages for maintainability using the default thresholds.
Excluding files and paths
Qlty is Git-aware and honors .gitignore
files. Additional exclude patterns can be specified using glob syntax:
Maintainability checks and thresholds
Qlty evaluates code maintainability using a set of static analysis checks implemented for all supported programming languages.
These checks have reasonable defaults, and can be customized further. For example:
Linting and SAST plugins
Plugins extend Qlty with thousands of checks from linters and security scanning tools. Plugin definitions are stored in a Git repository called a Source.
Qlty provides a default source which should be included in your .qlty/qlty.toml
as follows. (This is automatically generated if you used qlty init
.)
With your Source specified, you can list available plugins:
Then, you can activate any available plugin as follows.
Plugin configurations
When running Qlty, plugins are configured using their own analysis configuration files (e.g. .eslintrc
).
Plugin configuration files can be stored in the .qlty/configs/
directory in order to keep the root of the repository tidy. Qlty will automatically move them to the correct location when it runs analysis.
Check modes
Qlty’s maintinability analysis, linters, and security scanning plugins run Checks which emit findings called Issues.
By configuring the Mode, you keep developer workflows streamlined while preserving issues for later review. Qlty Cloud uses the Mode to determine the behavior for handling issues.
The Mode can be configured at a Plugin level to one of four options: