Skip to content

No explicit isolated mode to disable user-level config in CLI runs #2942

@Hugo-Polloli

Description

@Hugo-Polloli

Summary

While working on ty, I hit a non-deterministic CLI snapshot failure caused by user-level config being applied during test runs.
There seems to be no first-class isolated mode to disable user-level config for deterministic CI/test execution.

cargo nextest run failed on:

  • ty::cli check_specific_paths

because output unexpectedly included:

  • warning[division-by-zero]
  • info: rule division-by-zero was selected in the configuration file

This came from my user config at ~/.config/ty/ty.toml:

[rules]
possibly-unresolved-reference = "warn"
possibly-missing-import = "warn"
division-by-zero = "warn"
unsupported-dynamic-base = "warn"

Expected

  • ty should provide a reliable, first-class way to ignore user-level config in isolated contexts (CI/tests/repro runs), e.g. a CLI flag or dedicated env var.
  • This should avoid requiring callers/tests to manually set XDG_CONFIG_HOME / APPDATA just to guarantee deterministic behavior.

Version

ty ruff/0.15.4+70 (61518af71 2026-03-02)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcliRelated to the command-line interfacetestingRelated to testing ty itself

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions