grunt-htmlhint icon indicating copy to clipboard operation
grunt-htmlhint copied to clipboard

Task doesn't fail on lint errors

Open dahei opened this issue 10 years ago • 1 comments

When running the task, I would expect the task to fail when any error is found within the html. (according to the validation rules I made up).

In my case, there are errors in the markup, which are also shown in the task results, but the task itself does not fail.

Here is my task setup

{
    options : {
        htmlhintrc : 'config/.htmlhintrc'
    },
    raw : [
        '<%= config.dev.data.raw_html %>/**/*.html'
    ]
}

which runs fine and results in the following output:


Running "htmlhint:raw" (htmlhint) task
   dev/data/raw/brand/de/stada.html
      L3 |</div>
          ^ Tag must be paired, missing: [ </h1> ], start tag match failed [ <h1> ] on line 2. (tag-pair)

   dev/data/raw/brand/en/stada.html
      L3 |</div>
          ^ Tag must be paired, missing: [ </h1> ], start tag match failed [ <h1> ] on line 2. (tag-pair)

>> 14 files lint free.

Done, without errors.

But there are errors! And 2 of 14 files are not lint free.

Shouldn't the task fail? Is it a bug?

I am using [email protected] and [email protected]

dahei avatar Feb 08 '16 13:02 dahei

+1

mbier avatar Feb 15 '16 14:02 mbier