-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Flake8 extensions/plugin (black, rst-docstrings, and other) entries not reported by vscode #4074
Comments
Note that as this regexp is not specific to the |
You can configure the arguments you wish to use in the |
@d3r3kk: Please provide an example of what you suggest because the possibility of customizing flake argument won't allow me to get my extension issues listing in the vscode PROBLEMS tab. The issue is with an hardcoded regexpr in the vscode extension's codebase which couldn't be customized via a flake argument. I specifically listed the problematic module and gave a possible solution. |
This reflects a change in flake8 v3, http://flake8.pycqa.org/en/latest/plugin-development/registering-plugins.html
The original convention of a single letter and three numbers had lead to a number of flake8 plugin codes clashing. (Commenting as the author of two of the flake8 plugins mentioned - nice to see them being used) |
Since the triage seems to want this as a pull request, I turned @jraygauthier's sensible suggestion into PR #4443. Update: I closed the PR, the process was more involved than I expected. |
@peterjc thanks for the PR. Can I help in any way to re-open the PR? I yield any copyright on the suggested change (if any). |
@jraygauthier probably simplest to make a new pull request yourself, and if possible do this at home outside of work hours (to avoid the awkward question about if you have your employer's permission to give Microsoft the legal permissions they want). On the technical side, you need to commit the fix itself in |
Alright, will try to take some time to do this. |
FYI: This also applies to |
* change REGEX for flake8 v3 * create news file for fixing #4074
Has this issue been resolved? I am experiencing this problem as well:
|
The |
False alarm, apologies. I improperly typed my workspace folder variable as I can confirm the |
FYI, in my case, the
and |
@adam-grant-hendry Can you open a separate issue for "and flake8 failed silently.", we would like to know more details about it. Also seems like the original bug in the issue was fixed by #6925 but we forgot to close it? |
Environment data
Expected behaviour
Given the following
mymodule.py
file:which when linted with flake8 and its plugins (see below for details) gives:
I would expect to get the same list of issue in vscode.
Note that the format string used is the same as the one used by
vscode-python/src/client/linters/flake8.ts
to runflake8
.Actual behaviour
Instead, I get:
See that none of the
BLK
entries from theflake8-black
plugin are present, nor anyRST
entries from theflake8-rst-docstrings
plugin. However, theD
entries from theflake8-docstrings
are properly reported.The problem is with code prefix of more than a single alphabetical character.
Steps to reproduce:
Make sure you launch vscode in an environement with
flake8
installed and the following flake8 plugins:flake8-black
flake8-docstrings
flake8-rst-docstrings
Make sure vscode has flake8 linter active and global linting:
Launch
Python: Run Linting
on the providedmymodule.py
module. Look at the Problems listing in vscode.Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)Console is empty after performing the linting action. I'm not sure about this source map thing however:
Suggested fix
In
vscode-python/src/client/linters/baseLinter.ts
, changeREGEX
from:which matches only codes with a single alphabetic character
to
which should now match codes with more that a single alphabetic character.
The text was updated successfully, but these errors were encountered: