问题
I am trying to discover how great our problem is with duplicate code, therefore I need to be able to mail a nice report (HTML, PDF, or word) to everyone on the team that lists all the duplicates that are found.
How do I create such a report? (At this stage, I am just looking for a one-of ad hock solution to help with scoping the problem)
(Our codebase is in VB.NET and I am running on Windows 7)
回答1:
Personally I would wrote a (Perl|Insert your choice of language here) program that takes the output of Simian and spits off HTML formatted as you prefer.
So you can put it as a post-process step in your automated Simian run (I suppose you want this to run every night, or on request, or whatever... definitely something you want to automate, anyway, because will have to include things like getting a copy from your code repository for all modules, send an email to a mailing list at the end etc. etc.)
I am sorry but I doubt there is a real alternative to "roll your own" here: I doubt there are companies (or even OS projects) dealing with a niche problems like "formatting output of a code-duplication utility).
Note: this should be even easier considering Simian can apparently produce XML output (by using "-formatter=xml")
来源:https://stackoverflow.com/questions/2272389/how-do-i-get-simian-to-produce-a-nice-html-report-i-can-email-to-everyone-on-the