Skip to content

gspot.toml

gspot.toml holds your configurations, level, settings, and ignores. Setting commands edit the file and apply each change.

gspot list
gspot list settings

Add --json for complete values and inherited settings. The settings reference lists accepted values and defaults.

A configuration groups the checks, tool files, and rules for a language, framework, or concern. Select one, or drop a language or framework, by name:

gspot add vitest
gspot remove nextjs

gspot remove nextjs writes nextjs into removed_configurations, so detection does not select it again; gspot add nextjs reverses that. gspot does not remove a configuration that another selected configuration needs. When the tools change, gspot prints a reminder to run gspot install.

gspot always selects most general configurations, such as secrets, spelling, and security, even when you write the list yourself, and gspot add and gspot remove refuse them. To run fewer of their checks, change the level, or turn one check off with an ignore.

In the file, the selection reads:

gspot.toml
configurations = ["bash"]
level = "recommended"

Framework lint rules follow your dependencies. For example, a NestJS project that uses @nestjs/swagger also gets the Swagger lint rules.

gspot set level all

Levels define recommended and all. Neither enables experimental or preview lint rules.

Command What it does
gspot set <setting> <value> Writes your value. On a list, it adds items to the shipped ones.
gspot unset <setting> Removes your value and its reason, so the default takes effect again.
gspot unset <setting> <item...> Removes list items that you wrote. The shipped items stay.

To change a setting in one folder only, see Settings in a scope.

A value that loosens a check needs a reason beside it. This covers a raised limit, lowered coverage, and an item that the shipped list lacks added to an allow-list, such as allowed_words or dependencies.allowed_registries:

gspot.toml
[limits]
function_lines = { value = 80, reason = "The parser is one state machine." }

gspot.toml uses TOML 1.0. Keep each inline table on one line. The JSON Schema describes every key. Editors apply it on their own once SchemaStore lists gspot, so gspot.toml needs no #:schema comment. See Editors.

After an edit, preview the changes, then write them and install the tools:

gspot apply --dry-run
gspot apply
gspot install

When files of a language or framework appear, select its configuration with gspot add, then run gspot install.

When the files go away, its checks become inactive. Its configurations, settings, ignores, and command checks stay in gspot.toml. gspot apply writes generated files from your saved settings and does not change configurations or removed_configurations.