gspot.toml
gspot.toml holds your configurations, level, settings, and ignores. Setting commands edit the file and apply each
change.
See the current choices
Section titled “See the current choices”gspot listgspot list settingsAdd --json for complete values and inherited settings. The settings reference lists accepted
values and defaults.
Choose configurations
Section titled “Choose configurations”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 vitestgspot remove nextjsgspot 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:
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.
The level
Section titled “The level”gspot set level allLevels define recommended and all. Neither enables experimental or preview lint rules.
Change a setting
Section titled “Change a setting”| 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:
[limits]function_lines = { value = 80, reason = "The parser is one state machine." }Edit the file by hand
Section titled “Edit the file by hand”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-rungspot applygspot installWhen files of a language appear or go
Section titled “When files of a language appear or go”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.