excluding directories

For technical support and bug reports for all editions of CSS HTML Validator, including htmlval for Linux and Mac.
User avatar
roedygr
Rank V - Professional
Posts: 367
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada

excluding directories

Post by roedygr »

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
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: excluding directories

Post by Albert Wiersch »

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\*
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
roedygr
Rank V - Professional
Posts: 367
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada

Re: excluding directories

Post by roedygr »

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
You do not have the required permissions to view the files attached to this post.
User avatar
roedygr
Rank V - Professional
Posts: 367
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada

Re: excluding directories

Post by roedygr »

I foot etc are names of directories. Should I be using file names?
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: excluding directories

Post by Albert Wiersch »

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'.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
roedygr
Rank V - Professional
Posts: 367
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada

Re: excluding directories

Post by roedygr »

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
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: excluding directories

Post by Albert Wiersch »

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.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
roedygr
Rank V - Professional
Posts: 367
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada

Re: excluding directories

Post by roedygr »

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
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: excluding directories

Post by Albert Wiersch »

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.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
roedygr
Rank V - Professional
Posts: 367
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada

Re: excluding directories

Post by roedygr »

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
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX

Re: excluding directories

Post by Albert Wiersch »

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:
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial