mirror of https://github.com/astral-sh/ruff
Reimplements https://github.com/astral-sh/ruff/pull/3104 Closes https://github.com/astral-sh/ruff/issues/5726 Note that we will generate the hash for a cache key twice in normal operation. Once to check for the cached item and again to update the cache. We could optimize this by generating the hash once in `diagnostics::lint_file` and passing the `u64` into `get` and `update`. We'd probably want to wrap it in a `CacheKeyHash` enum for type safety. ## Test plan Unit tests for Windows and Unix. Manual test with case from issue ``` ❯ touch fake.py ❯ chmod +x fake.py ❯ ./target/debug/ruff --select EXE fake.py fake.py:1:1: EXE002 The file is executable but no shebang is present Found 1 error. ❯ chmod -x fake.py ❯ ./target/debug/ruff --select EXE fake.py ``` |
||
|---|---|---|
| .. | ||
| flake8_to_ruff | ||
| ruff | ||
| ruff_benchmark | ||
| ruff_cache | ||
| ruff_cli | ||
| ruff_dev | ||
| ruff_diagnostics | ||
| ruff_formatter | ||
| ruff_index | ||
| ruff_macros | ||
| ruff_python_ast | ||
| ruff_python_formatter | ||
| ruff_python_resolver | ||
| ruff_python_semantic | ||
| ruff_python_stdlib | ||
| ruff_python_trivia | ||
| ruff_rustpython | ||
| ruff_shrinking | ||
| ruff_textwrap | ||
| ruff_wasm | ||