views:

67

answers:

1

We have to validate large amounts of resource files for naming conventions and format integrity, etc.

Is there a framework/tool available to make this easier? Build tools like Ant/Phing spring to mind but I wonder if there's something more focused to this kind of testing.

Ideally it would cache results based on modification-time and generate a report of non-conforming files. It should be flexible enough to quickly and easily add arbitrary tests to files that fit a certain regex. Like test all *.psd that lie 3 directories deep and ensure their colorspace is CMYK. It should be easy to add depdendencies too so that if one of those PSD's fails, the parent directory .. say 2 levels up, would be flagged invalid too. Ideally it would be pluggable so we can just write a shell script or something to perform new tests (like the CMYK test) that returns true/false.

Of course we can roll our own... but rather not reinvent the wheel.

Thoughts?

+1  A: 

Checkstyle is the best tool for this.

Specifically, you may need to write a FileSetCheck .

npellow
Thanks for the answer. Checkstyle seems pretty heavily aimed towards checking source code formatting. I'm looking at validating filesystem structure and file integrity. So I guess you're saying it's trivial to bend the Checkstyle engine to do the kind of tests I'm talking about?
ah - thanks for the clarification. I updated my Answer.
npellow