vale icon indicating copy to clipboard operation
vale copied to clipboard

Inconsistent issue reporting.

Open pvande opened this issue 3 years ago • 1 comments

Installed via Homebrew on macOS.

Given the following input:

<html>
<body>
  <p>This paragraph has has a duplication.</p>
  <p>This paragraph has <b>has</b> a duplication.</p>
  <p>
    This paragraph has has a
    duplication on multiple lines.
  </p>

  <p>This paragraph has <b>has</b> an <font>obsolete</font> tag</p>
  <p>
    This paragraph has <b>has</b> a
    duplication on multiple lines.
  </p>
  <p>
    This paragraph has
    has a duplication
    across lines.
  </p>
</body>
</html>

I get the following output:

 sample.html
 3:21  error  'has' is repeated!  Vale.Repetition 
 4:1   error  'has' is repeated!  Vale.Repetition 
 6:20  error  'has' is repeated!  Vale.Repetition 

✖ 3 errors, 0 warnings and 0 suggestions in 1 file.

Despite the example containing six instances of the same error, only three are actually being reported. Additionally, the second report (<p>… has <b>has</b> …</p>) is described as covering the entire line, rather than more useful description of the error location.

pvande avatar Oct 24 '22 20:10 pvande

I have encounted what I think is a related issue. Take this example:

<p>This is good. But this is bad.</p>
<p>This is good.
But this is bad.</p>

The second one triggers proselint.But: “Do not start a paragraph with a 'but'.” - BUT it's within the same paragraph!

$ vale example.html

 example.html
 3:1  error  Do not start a paragraph with   proselint.But
             a 'but'.

✖ 1 error, 0 warnings and 0 suggestions in 1 file.

I'm triggering this because I write my reStructuredText with one sentence per line, which rst2html copies into its output.

adamchainz avatar Jan 29 '23 11:01 adamchainz