Integrating CSE validator in hudson CI

Post here if your topic is about CSE HTML Validator but doesn't fit in another forum.

Integrating CSE validator in hudson CI

Postby sudheshna » Tue Mar 29, 2011 3:47 am

Hi,

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.

Thanks
Sudheshna K
sudheshna
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 1
Joined: Tue Mar 29, 2011 3:07 am

Re: Integrating CSE validator in hudson CI

Postby Albert Wiersch » Tue Mar 29, 2011 8:44 am

Hello,

Just to confirm, CSE HTML Validator is working as expected (with the expected return values) but your issue is with the script? Is that correct?

By the way, you may want to make sure that "%%X" is passing files enclosed in quotes, in case there is a space character.

Thank you.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX


Return to Other CSE HTML Validator

Who is online

Users browsing this forum: No registered users and 2 guests

cron