Skip to content
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

Task doesn't fail on lint errors #22

Open
dahei opened this issue Feb 8, 2016 · 1 comment
Open

Task doesn't fail on lint errors #22

dahei opened this issue Feb 8, 2016 · 1 comment

Comments

@dahei
Copy link

dahei commented Feb 8, 2016

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

@mbier
Copy link

mbier commented Feb 15, 2016

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants