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

Warnings D002 and D004 at every single line #84

Closed
lgarcin opened this Issue Mar 18, 2018 · 6 comments

Comments

Projects
None yet
4 participants
@lgarcin
Copy link

lgarcin commented Mar 18, 2018

Please follow the troubleshooting guide to locate the culprit.

If troubleshooting does not reveal any useful information, provide the following information to create a new issue,

Environment

  • Extension version: 57.0.0
  • Visual Studio Code version: 1.21.1
  • Operating System version: Windows 10
  • Python version: 3.6
  • sphinx version: 1.6.7
  • A sample of conf.py or its important fragments:

Expected behavior
No warnings.

Actual behavior
I get these two warnings at every line of rST document
'D002 Trailing whitespace'
'D004 Found literal carriage return'
I still get these warnings even after trimming whitespaces in VSCode

Detailed Steps to reproduce the problem

@lextm

This comment has been minimized.

Copy link
Member

lextm commented Mar 18, 2018

Similar to #83 you need to pass extra arguments to doc8 to suppress the two warnings.

My investigation shows that doc8 seems to assume all line endings should be \n, not \r\n, so it keeps reporting the two issues for Windows based files.

Need to report to doc8 developers as only they can fix it.

@lextm

This comment has been minimized.

Copy link
Member

lextm commented Mar 18, 2018

Reported back to doc8 developers,

https://bugs.launchpad.net/doc8/+bug/1756704

Wait for their responses.

@mloskot

This comment has been minimized.

Copy link

mloskot commented Apr 2, 2018

@lextm I confirm your finding about \r\n not being kosher for doc8. Thanks for reporting it upstream.

@tormiss

This comment has been minimized.

Copy link

tormiss commented Apr 25, 2018

A temporary workaround is to ignore these two rules with custom VSCode config:

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

This comment has been minimized.

Copy link
Member

lextm commented May 15, 2018

Please report to doc8 developers if you want this issue to be fixed ultimately,

https://bugs.launchpad.net/doc8/+bug/1756704/+affectsmetoo

@lextm

This comment has been minimized.

Copy link
Member

lextm commented Dec 23, 2018

Close it now as there isn't much to do in this extension.

@lextm lextm closed this Dec 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment