Skip to content

Task doesn't fail on lint errors #22

@dahei

Description

@dahei

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 grunt@0.4.5 and grunt-htmlhint@0.9.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions