On Mon, 2010-02-22 at 11:11 -0600, David B Funk wrote:
> The other special rule name is the hidden rule, one that starts with "__".
> Those rules are assigned a score of 0 but do run regardless and aren't
> reported in the scoring report. The intention there is that they're used
> to form meta-rules when you need to combine a number of factors and only
> want the final result to score/report.
> When developing hidden rules it's easy to make them visable for debugging
> purposes, mearly prepend a 'T' to the name which turns them into visible
> testing rules.

This is the wrong approach. The non-scoring sub-rules with a double
underscore prefix are meant for meta rules.

Making them "visible" by transforming them into T_ testing rules sure
would make them visible in the *default* SA report headers, but comes
with an enormous downside: You have to rename *all* occurrences in all
meta rules using them. Moreover, it's pretty much a rule design decision
to not have them visible.

If -- for debugging purpose -- you want to have non-scoring sub-rules
visible, rather than renaming them, the best approach is  (a) either to
have a look at the -D debug output, or  (b) to add a header with the
_SUBTESTS(,)_ template tag. Depending on whether you just need some
ad-hoc checking, or on a broader basis.


-- 
char *t="\10pse\0r\0dtu...@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}

Reply via email to