excluding directories

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
User avatar
roedygr
Rank V - Professional
Rank V - Professional
Posts: 370
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

excluding directories

Post by roedygr » Thu Apr 03, 2014 8:12 pm

I have a large directory tree to validate. Each directory has a /foot directory
Is there a way to tersely avoid all the /foot directories, like you can in SVN?

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: excluding directories

Post by Albert Wiersch » Thu Apr 03, 2014 10:31 pm

Hello,

You can load the target list and then go to the 'Target List Options' tab and use this in the 'Don't process these targets' option: */foot/*

Or you may have to use (with backslash instead of forward slash): *\foot\*
Image
Albert Wiersch

User avatar
roedygr
Rank V - Professional
Rank V - Professional
Posts: 370
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

Re: excluding directories

Post by roedygr » Fri Apr 11, 2014 2:03 pm

Albert Wiersch wrote:Hello,
Or you may have to use (with backslash instead of forward slash): *\foot\*
I tried both with \ and /. It is ignored.
See attached screenshot
Attachments
shot.png
screen shot of setting option
shot.png (1.66 KiB) Viewed 5125 times

User avatar
roedygr
Rank V - Professional
Rank V - Professional
Posts: 370
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

Re: excluding directories

Post by roedygr » Fri Apr 11, 2014 2:04 pm

I foot etc are names of directories. Should I be using file names?

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: excluding directories

Post by Albert Wiersch » Fri Apr 11, 2014 2:18 pm

Hello,

It looks like you're putting it in the wrong place. Please try moving it to 'Don't process these targets' instead of 'Don't check these links'.
Image
Albert Wiersch

User avatar
roedygr
Rank V - Professional
Rank V - Professional
Posts: 370
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

Re: excluding directories

Post by roedygr » Fri Apr 11, 2014 5:04 pm

Great! it is working now. Your help says:

Strings separated by semicolons; targets that match are NOT processed.

I suggest this:

Strings separated by semicolons; targets that match are NOT processed. e.g. */include/* to avoid processing all directories named include.

similarly for the link exclude. I doubt anyone ever uses this feature simply for lack of an example. There are so many wildcard schemes out there.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: excluding directories

Post by Albert Wiersch » Fri Apr 11, 2014 5:30 pm

Great! I'm glad it's working. :D

Rather than try to squeeze too much information in the help hint, I just added "Press F1 for more information.". If you press F1, then it should take you to a help page with detailed information (and some examples) on the options.
Image
Albert Wiersch

User avatar
roedygr
Rank V - Professional
Rank V - Professional
Posts: 370
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

Re: excluding directories

Post by roedygr » Fri Apr 11, 2014 7:17 pm

roedygr wrote:Great! it is working now..
oops I spoke too soon

*\foot\*;*\include\*;*\snippet\*;*\embellishment\*

is letting through files of the form the E:\mindprod\book\foot\9781449311520.html
I think it looked like it was working because the cache mechanism was filtering out the foot files.

My script looks like this:
<?xml version="1.0"?>
<csebatchwizardtargetlist version="8">
<options htmlreportfilename="C:\temp\batchreport.html" functionsfilename="E:\env\htmlval\cache.script" excludestrings="*\foot\*;*\include\*;*\snippet\*;*\embellishment\*" />
<target flags="1069547546" target="E:\mindprod" />
</csebatchwizardtargetlist>

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: excluding directories

Post by Albert Wiersch » Fri Apr 11, 2014 7:33 pm

I see the problem. The cache code was overriding those exclusions.

I've updated the "caching code" here:
http://www.htmlvalidator.com/CSEForum/v ... 9021#p9021

Please update to that. I added this line:

Code: Select all

 if !$otca_add return;
So if the target's default is to not process the target because you have excluded it, then the cache code will not override it.
Image
Albert Wiersch

User avatar
roedygr
Rank V - Professional
Rank V - Professional
Posts: 370
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

Re: excluding directories

Post by roedygr » Fri Apr 11, 2014 9:12 pm

S U C C E S S

both the problem with the missing "luke" cache files is fixed, and so is *\foot\*.

Thank you. It is so fast! I afford to validate everything much more frequently.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: excluding directories

Post by Albert Wiersch » Fri Apr 11, 2014 10:00 pm

roedygr wrote:Thank you. It is so fast! I afford to validate everything much more frequently.
You're very welcome!

I knew we'd get everything ironed out sooner or later. :mrgreen:
Image
Albert Wiersch

Post Reply