-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run linters twice: 1) baseline, 2) current; then show new messages #393
Conversation
@PatrickJordanCongenica, you may be interested to try out this branch! It fixes #383 (originally raised by you in #328). Would you be interested to do a code review as well? Would you accept an invite as a collaborator on the repository so you could be assigned as a reviewer? I'm going to clean up some commits still though before this is ready for review. |
06be667
to
ac066ef
Compare
Hm, let's rethink a bit. With this patch, Darker is only going to show those linter messages which were newly introduced as a result of changes in the code. But we'd probably want it to also show old linter messages if they happen to fall on modified lines! |
dc87d79
to
20b05bb
Compare
b3c66b8
to
bf381cc
Compare
bf381cc
to
f3b7e91
Compare
I believe the patch now does this as well. |
071adf7
to
e8e4c5c
Compare
b6c484d
to
62b48fd
Compare
be6daf5
to
0c9dfe5
Compare
Update: The issue described below was solved in #453. The well-known Python 3.7.2 bug #35797 doesn't explain the test failure on Run actions/setup-python@v4
with:
python-version: 3.7
check-latest: false
token: ***
update-environment: true
Installed versions
Successfully set up CPython (3.7.9) > os.unlink(fullname)
E PermissionError: [WinError 5] Access is denied:
'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp12s99vo_\\test_run_linters_messages_befo1\\.git\\objects
\\7a\\ea9bf550cfe9c14baf1e82fd65ebf936d81e22' In a comment to psf/requests-html#249, @ADVEngr had this happen due to failing to provide a proper path for a subprocess:
Here in another comment to psf/requests-html#249 is a report from @insanepopeye resembling our case more: >>> import os
>>> os.chdir(r"C:\Users\Popeye\Desktop\OD\POC\APP\uploads")
>>> test = r"C:\Users\Popeye\Desktop\OD\POC\APP\uploads"
>>> os.remove(test)
Traceback (most recent call last):
File "", line 1, in
os.remove(test)
PermissionError: [WinError 5] Access is denied: 'C:\Users\Popeye\Desktop\OD\POC\APP\uploads' Could this be because they're trying to remove the current working directory? In another comment to psf/requests-html#249 @leenjiru pointed to the Stack Overflow question Deleting read-only directory in Python. And like our problem, that question is about This might be a case of Python bug #26660 "tempfile.TemporaryDirectory() cleanup exception if nonwriteable or non-searchable files or directories created". Maybe it would help to recursively set all created files in the temporary directory read-write at teardown of the |
53aa565
to
2d14cf9
Compare
Includes the name of the linter which produced the message.
The mapping is for line numbers of unmodified lines in a number of files between original and modified versions.
2d14cf9
to
d582c68
Compare
Needed for Windows compatibility
d582c68
to
7c2c222
Compare
Hide linter messages which were already present in the baseline. Track unmodified blocks of code which are moved up or down due to other changes, and match linter messages even though the line number might have changed since the baseline.
Fixes #383 and #380.
cov_to_lint.py
support