Checktyle problem with long directory paths
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <0A436F3D390CBB4BB77513C619C7837912D79923@TLRUSMNEAGMBX16.ERF.THOMSON.COM> |
I've got a problem with checkstyle generating file paths for HTML files that are longer than Windows accepts. I am currently using Ant with checkstyle 4.2. My checkstyle target performs two steps, the first of which is running checkstyle on all of my source code and generating an xml file. The xml file is standard and contains the absolute path to the source code it scanned and any errors with those files. The xml file is then converted to HTML in the second step. My problem occurs with the use of absolute file pathing in the xml file. For example, assume I have the following directory structure: c:\projects\TestProject underneath TestProject I have \src\com\toc\olc\SomeClass.java and my checkstyle output directory \checkstyle What I end up with for my html files underneath the checkstyle directory is files\C_\projects\TestProject\src\com\toc\olc\SomeClass.java.html Which in Windows has an absolute path of: c:\projects\TestProject\checkstyle\files\C_\projects\TestProject\src\com \toc\olc\SomeClass.java.html In some cases this gets very long, more than 256 characters and causes the html rendering to fail. I would like to be able to get rid of the absolute pathing to the html file and maintain the relative path. So I end up with c:\projects\TestProject\checkstyle\files\src\com\toc\olc\SomeClass.java. html as the path to the html, without the C_\projects\TestProject\ I can probably do something in ant to remove this from the xml file, but I'd rather do something withing checkstyle as that seems cleaner. Confusing to be sure, but it's proven much easier to see than explain :) Thanks for any help, Adam ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Checkstyle-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/checkstyle-user