4
我在64位PC上使用Windows 10。最近,我開始在Windows上使用VS Bash和Ubuntu Bash。除了掉毛之外,一切都很好。我試圖讓它與pylint和pep8一起工作,但沒有一個能夠工作。我認爲問題是由於棉絨的位置造成的。但是,我無法弄清楚如何解決這個問題。您可以檢查我的設置爲pylint:Visual Studio代碼,與WSL的Python LINT(用於Linux的Windows子系統)
// Whether to lint Python files using pylint.
"python.linting.pylintEnabled": true,
// Severity of Pylint message type 'Convention/C'.
"python.linting.pylintCategorySeverity.convention": "Information",
// Severity of Pylint message type 'Refactor/R'.
"python.linting.pylintCategorySeverity.refactor": "Hint",
// Severity of Pylint message type 'Warning/W'.
"python.linting.pylintCategorySeverity.warning": "Warning",
// Severity of Pylint message type 'Error/E'.
"python.linting.pylintCategorySeverity.error": "Error",
// Severity of Pylint message type 'Fatal/F'.
"python.linting.pylintCategorySeverity.fatal": "Error",
// Path to Pylint, you can use a custom version of pylint by modifying this
// setting to include the full path.
"python.linting.pylintPath": "pylint",
// Arguments passed in. Each argument is a separate item in the array.
"python.linting.pylintArgs": [],
我將不勝感激任何幫助。謝謝你...
「Bash on Windows」a.k.a WSL是一個命令行環境。在其中使用GUI編輯器(VS代碼)有什麼意義?無論如何,主機Windows和「bash」容器共享的文件夾路徑以/ mnt/c(或其他驅動器號)開頭,是的,您需要在Windows和bash端使用不同的路徑。 RTFM。 – ddbug
@ddbug感謝您的評論。 VS Code是任何編程語言的代碼編輯器。我使用bash通過編輯器編譯代碼。但是,linter已經安裝在bash中。因此,我不需要/ mnt/c在Windows中訪問我的文檔。我嘗試過「C:\\ Users \\ user \\ AppData \\ Local \\ lxss \ rootfs \\ usr \ bin \\ pylint」,但這並沒有奏效。 –