validator/grunt-html

Is there any way to exclude specific files?

jenkinsw1 opened this issue · 1 comments

Hi - I have a couple of files that fail linting, and I expect them to fail, but they are within directories with other files that need linting fully. I guess I can set up a task that lists all the other files in an array in the target list but I was hoping there is some easy way to exclude them instead, which would be easier and more robust. I can then have a separate grunt task to lint those files with the relevant messages in the ignore section.
Thanks,
Will

OK, typically enough 10 minutes after giving in and asking for help I figure it out...!

For anyone else looking for the same, simply use the very-standard not operator !, so an array of files would be:

src: ['source/directory/path/*.html', '!source/directory/path/fileNameToExclude.html']