praveenvijayan / grunt-html-validation

W3C html validaton grunt plugin. Validate all files in a directory automatically.
MIT License
75 stars 39 forks source link

Wrong counting of files when using a wrapfile? #40

Open mpoelstra opened 10 years ago

mpoelstra commented 10 years ago

When using the wrapfile option I always encounter the following error after the last validated file:

Fatal error: Unable to read "undefined" file (Error code: ENOENT).

This is due to the code on L275:

w3cjs_options.input = wrapfile.replace("<!-- CONTENT -->", grunt.file.read(files[counter]));

Changing L265:

if (options.wrapfile) {

Into

if (options.wrapfile && files[counter]) {

Will fix this, but I think this is more a workaround and not the best fix. What do you think?

dynamicdan commented 10 years ago

Worked for me but now I have

Running "validation:files" (validation) task
Validated skipping.._tempvlidation.html

Done, without errors.

which is odd.

trevordmiller commented 10 years ago

I have the same "Unable to read 'undefined' file" error when using wrapfile @mpoelstra.

Bitneko commented 9 years ago

I have the similar problem with multiple remote files. On the first successful remote file, it will just skip the remaining files with 'Validated skipping.._tempvlidation.html' messge.