ruff/crates/ruff_cli
Aarni Koskela 7dabc4598b
Allow RUFF_NO_CACHE environment variable (like RUFF_CACHE_DIR) (#8538)
## Summary

Being able to set `--no-cache` without touching the command line makes
comparing formatter speed with e.g. Hyperfine a lot easier; Black allows
one to set `BLACK_CACHE_DIR=/dev/null`, but setting
`RUFF_CACHE_DIR=/dev/null` has Ruff choke:

```
error: Failed to initialize cache at /dev/null: Not a directory (os error 20)
error: Failed to initialize cache at /dev/null: Not a directory (os error 20)
warning: Failed to open cache file '/dev/null/0.1.4/18160934645386409287': Not a directory (os error 20)
```

Alternately, we could make a `/dev/null` (or `nul` on Windows) cache
directory imply `--no-cache`?

## Test Plan

None yet.
2023-11-07 08:35:28 -06:00
..
resources/test/fixtures Formatter parentheses support for `IpyEscapeCommand` (#8207) 2023-10-25 14:01:50 +00:00
src Allow RUFF_NO_CACHE environment variable (like RUFF_CACHE_DIR) (#8538) 2023-11-07 08:35:28 -06:00
tests Respect --force-exclude for lint.exclude and format.exclude (#8393) 2023-10-31 17:45:48 -04:00
Cargo.toml Bump version to v0.1.4 (#8477) 2023-11-03 14:52:56 -04:00
build.rs Add `ruff version` with long version display (#8034) 2023-10-20 14:07:41 -05:00