VS Code 报大量 D002 和 D004 错误的解决办法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013614126/article/details/83042221

VS Code 报大量 D002 和 D004 错误

错误内容

D002 Trailing whitespace
D004 Found literal carriage return

原因是 doc8 把 windows 式结尾 \r\n 视为不标准。在开发者进行处理前,临时方案是修改 vs code 设置:

{
    "restructuredtext.linter.extraArgs": [
        "--ignore D002",
        "--ignore D004"
    ]
}

参考:Warnings D002 and D004 at every single line

猜你喜欢

转载自blog.csdn.net/u013614126/article/details/83042221