sphinx-lint icon indicating copy to clipboard operation
sphinx-lint copied to clipboard

check_missing_space_after_literal false positive

Open JulienPalard opened this issue 3 years ago • 2 comments
trafficstars

see: https://github.com/sphinx-doc/sphinx/pull/10389#issuecomment-1158000799=

JulienPalard avatar Jun 18 '22 13:06 JulienPalard

@AA-Turner I can't reproduce the false positive you mentionned in https://github.com/sphinx-doc/sphinx/pull/10389#issuecomment-1158000799, see: https://github.com/sphinx-contrib/sphinx-lint/pull/37 any idea?

JulienPalard avatar Jun 18 '22 13:06 JulienPalard

There was an error in the Sphinx docs, but I was confused by the warnings from Sphinx-lint, and then accidentally fixed it.

This reST:

The version of Docutils used to build represented as a tuple of five elements.
For Docutils version 0.16.1 beta 2 this would be `(0, 16, 1, 'beta', 2)``.
The fourth element can be one of: ``alpha``, ``beta``, ``candidate``, ``final``.
``final`` always has 0 as the last element.

yields these warnings:

(sphinx) I:\Development\sphinx>sphinx-lint templating.rst
templating.rst:2: inline literal missing (escaped) space after literal: '``.\nThe fourth element can be one of: ``a' (missing-space-after-literal)
templating.rst:3: inline literal missing (escaped) space after literal: '``, ``b' (missing-space-after-literal)
templating.rst:3: inline literal missing (escaped) space after literal: '``, ``c' (missing-space-after-literal)
templating.rst:3: inline literal missing (escaped) space after literal: '``, ``f' (missing-space-after-literal)
templating.rst:3: inline literal missing (escaped) space after literal: '``.\n``f' (missing-space-after-literal)

I'd expect to see a single warning about an improperly opened inline-literal, and the space after literal false positives confused me.

Sorry for the false report, but I think there could be a usability improvement here.

A

AA-Turner avatar Jun 19 '22 22:06 AA-Turner