ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darrell DeBoer <>
Subject [myrmidon] PATCH: NameValidator
Date Sat, 09 Mar 2002 13:39:22 GMT

Attached is a patch addressing the myrmidon TODO items:
  "Validate project and target names in DefaultProjectBuilder..."
  "Similarly, validate property names, using the same rules."

The rules I've currently set up:
* For project and target names.
    - Letters and digits are permitted anywhere.
    - Whitespace is permitted internally
    - "_" is allowed as first character, and "_-." as internal characters.
* For property names:
    - As per project and target names, but no whitespace is permitted.
These rules will be trivial to modify.

Change details:
* NameValidator provides a reasonably flexible mechanism for 
specifying/testing name validity.
* NameValidator is used by DefaultProjectBuilder for project and target 
names, and by DefaultTaskContext for Property names. 
* Added a bunch of tests


(Hmmm - I just thought that I should probably adjust "todo.xml" as part of my 
patch. Maybe next time...)

View raw message