You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`
spon> ruff --version
ruff 0.0.277
spon> touch fake.py
spon> chmod +x fake.py
spon> ruff check --select EXE .
fake.py:1:1: EXE002 The file is executable but no shebang is present
Found 1 error.
spon> chmod -x fake.py
spon> ls -l
total 0
-rw-rw-r-- 1 spon spon 0 Jul 13 16:50 fake.py
spon> ruff check --select EXE .
fake.py:1:1: EXE002 The file is executable but no shebang is present
Found 1 error.
spon> ruff check --select EXE -n .
spon> ruff check --select EXE .
fake.py:1:1: EXE002 The file is executable but no shebang is present
Found 1 error.
`
I'd expect ruff to work here without explicit cache manipulation
The text was updated successfully, but these errors were encountered:
Reimplements #3104Closes#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
```
`
spon> ruff --version
ruff 0.0.277
spon> touch fake.py
spon> chmod +x fake.py
spon> ruff check --select EXE .
fake.py:1:1: EXE002 The file is executable but no shebang is present
Found 1 error.
spon> chmod -x fake.py
spon> ls -l
total 0
-rw-rw-r-- 1 spon spon 0 Jul 13 16:50 fake.py
spon> ruff check --select EXE .
fake.py:1:1: EXE002 The file is executable but no shebang is present
Found 1 error.
spon> ruff check --select EXE -n .
spon> ruff check --select EXE .
fake.py:1:1: EXE002 The file is executable but no shebang is present
Found 1 error.
`
I'd expect ruff to work here without explicit cache manipulation
The text was updated successfully, but these errors were encountered: