dense-analysis / dense-analysis/ale
Enable ALE to lint diffs
- Dominant language
- Vim Script
- Stars
- 14k
- Forks
- 1.5k
- Avg merge
- 17h 49m
- Merged PRs (30d)
- 1
Description
The fix for https://github.com/w0rp/ale/issues/2399 caused a regression.
It's not great that before the fix, ALE would incorrectly lint the index file when using `:Gdiff`, but it's also not great that ALE doesn't lint the working directory file at all now.
Several times a day for code review I do
```
vim -p $(git diff --cached --name-only @~) -c "tabdo :Gdiff @~"
```
to open the previous version of the file, and (until this regression) show if the new version introduces any linting issues.
Since this patch, no errors are shown now until I run `diffoff` then `:ALELint` once again.
Sometimes I also do development using the previous version of the diff open, and I would still like to receive linting updates for changes I make to the working directory file.
Perhaps the patch in 9a0ece1ecb4cddf9eebbc5bfa224764c4b5ad670 would be improved by changing `ale#ShouldDoNothing` to check *two* things:
1. If `&diff` is on
2. If the file is in the current repository
This would make it so that in a `:Gdiff` scenario, the temporary index file would not get checked, but the working directory index file would. Does this sound reasonable?
Contributor guide
Assessment
This issue has not been assessed yet.