Integrating CSE validator in hudson CI

Post here if your topic is about CSS HTML Validator but doesn't fit in another forum.
Post Reply
sudheshna
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 1
Joined: Tue Mar 29, 2011 3:07 am

Integrating CSE validator in hudson CI

Post by sudheshna »

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
User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3590
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Integrating CSE validator in hudson CI

Post by Albert Wiersch »

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.
Post Reply