ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elankath, Tarun (Cognizant)" <>
Subject RE: grep functionality
Date Thu, 21 Nov 2002 05:22:52 GMT
This shouldn't be too tough to code right ?
If you use jdk1.4 for building then you could take help of the regexp API,
else use the regexp package from jakarta.

If you use 1.4 then I guess you need to make a custom CharSequence if your
source files are large

-----Original Message-----
From: Daniel L. Boxwell []
Sent: Wednesday, November 20, 2002 11:34 PM
Subject: grep functionality

I am looking for functionality in ANT that will allow me to define a list of
forbidden strings and then grep for them throughout my source tree. In
particular, I would like to be able to search for strings such as
	- System.out.println()
	- connection.commit()
	- etc. . .

Checkstyle will allow me to look for forbidden instantiations such as
java.lang.Boolean, but that doesn't really solve my problem. . . I had
originally thought of using the ReplaceRegExp task, but this task and all
other regular expression based tasks I have found seem to be replacement
oriented. Ideally I would have the ability to fail a build if a forbidden
string crept into the code.

Any suggestions would be appreciated. I hope that I am just overlooking
something simple!


View raw message