-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Daniel Quinlan writes:
> Actually, can I suggest a different naming convention?
>
> T_<bug number>_<test name>
>
> For example,
>
> T_4081_FOO_BAR
>
> Short and easy to look up. Also, does your code handle naming for
> new/overlapping/existing predicates for meta rules?
it's a hornet's nest ;)
- - 1. T_ prefix will overlap with our own T_ prefix. I'd prefer a new
prefix to keep them separate. "T_MC_" might work, but I used "MC_" here.
some votes on what people would prefer are welcome ;)
- - 2. there may be multiple revisions of rules and predicates with the same
name inside one bug number, as in bug 2243, so it'd need scoping by both
bug number and comment number; scoping by bug number alone will fail in
this situation.
- - 3. there may be new rules using *existing* rules as meta predicates, so
it can't rename all rulenames found; just the ones where the rules are
defined in that comment's ruleset.
Current code does all those 3. However it does have a failing:
- - It cannot deal with the case (as in bug 2243 comment 14) where a set of
new rules are posted that use rules from a previous comment (cmt 13) as
predicates. However I can't see a good way to deal with that case,
without breaking the case where a new comment revises a ruleset from an
earlier comment, without suffering rule name clashes. So I think that's
an acceptable limitation.
Finally, naming:
Due to our absurd rule-name-length limitation policy ;), we cannot do the
sensible thing, which would indeed be:
MC_{bugnum}_{cmtnum}_{rulename}
but current naming scheme is:
MC_{rulename}_{rnd}
where {rnd} is a 3-digit random number. (the idea is that hopefully
the rulename will be short enough to scrape past the length limit,
since --lint is used to ensure rules are valid before they're checked
into 70_scraped.cf.)
My current plans are to fix this by removing that stupid limit on rulename
and description lengths. They've caused WAY, *WAAAY* more problems than
they solved and I'm sick to death of them! >:( Some sensible wrapping
code would be simpler, and save EVERYONE a lot of trouble.
Once I do that I'll fix automc to use the sensible naming scheme.
- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Exmh CVS
iD8DBQFB6w7mMJF5cimLx9ARAvGyAKCa1YzsmAiNZUvYWpz37TxRpaxuFQCghjok
jsnMuww1KTH67V5PWOlXF3c=
=8MAI
-----END PGP SIGNATURE-----