I have to integrate cse validator in hudson for html validation of the pages. Here we will have each html project folder under a root folder and by specifying the folder location hudson builds the files, but I need to integrate cse validator along with each build. This can be done with batch wizard in hudson. I have created one and executed, validations are working fine and im getting the results in mentioned output file, but its not returning actual error code even if there is error in the validated html files,
following is my code for validation,
Code: Select all
@echo on setlocal enableextensions enabledelayedexpansion PUSHD "F:\Solutions\GND\Documents\Design\html\ValTest" For %%X in (*.html) do ( "C:\Program Files\HTMLValidator100\cmdlineprocessor" -outputfile output.txt -r1 %%X SET HTML_VAL_ERROR=!ERRORLEVEL! echo !HTML_VAL_ERROR! type output.txt >> result.txt IF !HTML_VAL_ERROR! GEQ 1 ( SET HTML_VAL_ERROR = 1 GOTO :EOF ) ) POPD EndLocal :EOF EXIT !HTML_VAL_ERROR!
Please any one can look in to this and help me to solve this, we have purchased a licence of validator but are unable to use it due to this issue.