简体   繁体   English

如何配置 VSCode 以 lint 项目中的所有文件,无论是否打开?

[英]How can I configure VSCode to lint all files in project, open or not?

I've got a python project in VSCode, and I'm using the flake8 linter and the pyright type checker.我在 VSCode 中有一个 python 项目,我正在使用flake8pyright类型检查器。 I'd like it to lint/check all files in the project, not just the one(s) that are open.我希望它能够检查/检查项目中的所有文件,而不仅仅是打开的文件。 How do I configure this?我该如何配置?

For pyright there is an option "Report errors for only currently-open files."对于pyright有一个选项“仅报告当前打开的文件的错误”。 I have unchecked that.我已经取消选中了。 There is a similar option in python "Python -> Analysis: Open Files Only" and I've disabled that. python“Python -> Analysis: Open Files Only”中有一个类似的选项,我已经禁用了它。

In both cases, I know there are errors (I can open a file and see them), but I do not see the errors in the PROBLEMS panel.在这两种情况下,我都知道存在错误(我可以打开文件并查看它们),但是我在“ PROBLEMS面板中没有看到错误。

Is there some other way I can make this work?有没有其他方法可以让我完成这项工作?

目前在 Python 扩展中不可用,但如果您愿意,请 👍相关功能请求

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM