Skip to content

gspot

Path patterns in gspot.toml that match files, current generated files, no config files that conflict with the generated ones, a reason on each suppression, and a reason for each setting made weaker.

Always.

Finds a tool config that a generated config file replaces, and the scripts, hooks, CI steps, and devDependencies that still call or repeat such a tool.

Runs at the commit stage, once for the repository.

The tool reads only the settings gspot writes, so a rule left in the old file looks active and does nothing, and a lint command fails or runs a second lint stack beside gspot.

Delete the file or the line that the message names, or replace the line with gspot check. gspot writes the settings of this tool; move a rule you need into gspot.toml.

A .commitlintrc.json while gspot runs commitlint reports a conflicting config file. Delete it, and write the rule you need in gspot.toml, such as commits.types. A script eslint . in package.json reports a lint command. Replace it with gspot check.

Rule What it checks What to do
conflicting-config The repository holds no tool config of its own for a tool that gspot writes a generated config file for. Carry each rule that you still need into gspot.toml, then delete the file or section.
lint-command No script, hook, CI step, or dependency of the repository runs a tool that gspot replaces. Run gspot check in its place, or delete the line.
gspot ignore gspot/conflicting-configs --paths "<path>" --reason "<why>"
gspot ignore gspot/conflicting-configs --rule conflicting-config --reason "<why>"

Compares generated files with the settings and reports changed, absent, and stray files.

Runs at the commit stage, once for the repository.

A generated file that drifts from gspot.toml runs a tool with settings nobody chose.

Change gspot.toml, then run gspot check --fix or gspot install. After a merge, run gspot install.

An edit by hand to a generated config file reports changed. Move the change into gspot.toml, then run gspot check --fix or gspot install. A stale tool lockfile under .gspot/ needs gspot install.

Rule What it checks What to do
changed Each generated file holds what the settings generate. Run gspot check --fix or gspot install.
absent Each file that the settings generate exists. Run gspot check --fix or gspot install.
stray Each file that gspot wrote belongs to a selected configuration. Run gspot check --fix or gspot install to delete it.
gspot ignore gspot/generated-files --paths "<path>" --reason "<why>"
gspot ignore gspot/generated-files --rule changed --reason "<why>"

Reports each path pattern in gspot.toml that matches no tracked file.

Runs at the commit stage, once for the repository.

An ignore or a path setting that matches nothing misleads the next reader.

Remove the pattern, or correct it so that it matches a tracked file.

An [[ignore]] record with paths = ["nowhere/**"] that matches no file reports unmatched-path. Remove the record, or correct its path and keep the reason.

gspot ignore gspot/unmatched-paths --paths "<path>" --reason "<why>"

Reports suppressions with no reason, any that lift a size or complexity limit, and Semgrep or Vale suppressions.

Runs at the commit stage.

A suppression with no reason hides a finding nobody reviewed.

Fix the finding and remove the suppression, or add a reason in the syntax of the tool. Never suppress a size or complexity limit: split the code by its steps, or ask the user to raise it in gspot.toml.

An eslint-disable-next-line comment without a reason reports a finding. Fix the code and remove the comment, or append -- reason: ... that explains the exception.

gspot ignore gspot/suppressions --paths "<path>" --reason "<why>"
Tool Form
shellcheck # shellcheck disable=SC2086 # reason: the word splitting is wanted here
stylelint /* stylelint-disable-next-line declaration-no-important -- reason: the vendor widget sets its own color */
html-validate <!-- [html-validate-disable-next no-inline-style -- reason: the email client strips classes] -->
eslint // eslint-disable-next-line no-console -- reason: the command prints its result
biome Refused; use gspot ignore
tsc // @ts-expect-error reason: the library types omit this overload
jest /* v8 ignore next -- reason: only a full disk reaches this branch */
markdownlint-cli2 <!-- markdownlint-disable-next-line MD013 -- reason: the table row cannot wrap -->
vale Refused; use gspot ignore
pytest if TYPE_CHECKING: # pragma: no cover # reason: imports for type checkers only
ruff import plugins # noqa: F401 # reason: the module registers its plugins on import
basedpyright value = payload['key'] # type: ignore[index] # reason: the payload is checked above
semgrep Refused; use gspot ignore
sqlfluff SELECT * FROM orders -- noqa: AM04 -- reason: the view mirrors every column
svelte-check <!-- svelte-ignore a11y_autofocus - reason: the dialog opens with the search field in focus -->
swiftlint // swiftlint:disable:next force_unwrapping - reason: the URL is a literal
swiftformat // swiftformat:disable:next redundantSelf - reason: the closure needs self
periphery // periphery:ignore - reason: the runtime calls it by name
vitest /* v8 ignore next -- reason: only a full disk reaches this branch */

Reports each configuration that the files of a scope suggest and that gspot.toml neither selects nor removes.

Runs at the commit stage, once for the repository.

A language that no configuration selects passes every check, because no check reads it.

Add the configuration, or remove it with a reason.

A main.py in a repository that selects only markdown reports detected-configuration. Run gspot add python, or gspot remove python --reason "<why>".

gspot ignore gspot/detected-configurations --paths "<path>" --reason "<why>"

Reports a gspot.toml change with no reason that adds or widens an ignore, removes a configuration, lowers the level, makes a setting weaker, or turns off hooks or rule files.

Runs at the push stage, once for the repository.

A change to the settings is the easiest way to pass a check, and only its reason tells a reviewer that someone chose it.

Give the change a reason, or undo it. Each message names the setting or the rule.

A push that raises limits.max_file_lines with no reason reports setting. Run gspot set limits.max_file_lines 400 --reason "the generated parser needs it".

Rule What it checks What to do
configuration A selected configuration goes away against the base revision. Run gspot remove <configuration> --reason "<why>", or select it again.
hooks hooks.enabled turns off against the base revision. Set hooks.enabled back to true.
import-rule No [[import_rule]] record goes away, gains a path, or may import more rules than at the base revision, and javascript.import_boundaries loses no entry. Restore the record of the base revision, or run gspot ignore gspot/weakenings --rule import-rule --reason "<why>".
level level drops against the base revision. Set level back.
rule-files rule_files turns off the rule files, or leaves more of them out, against the base revision. Set rule_files.enabled back to true, or remove the entry from rule_files.exclude.
rule-options New or changed options in tools.eslint.rules repeat each key of the options that gspot ships for the rule, with its shipped value. Repeat each shipped key with its shipped value in the options, or run gspot ignore gspot/weakenings --rule rule-options --reason "<why>".
setting A setting moves to a weaker value against the base revision, such as a higher limit. Run gspot set <key> <value> --reason "<why>", or restore the value of the base revision.
gspot ignore gspot/weakenings --rule configuration --reason "<why>"
Rule file Installed when
.gspot/rules/GENERATED.md Always
.gspot/rules/SUPPRESSIONS.md Always
Tool Version
node 22.22.3 or later, install it yourself