What steps will reproduce the problem? 1. Have a main method with some complexity (say static method calls or something) 2. Report shows up with main method being untestable What is the expected output? What do you see instead? I am not sure that we should be seeing main methods as untestable ? Do we even test main methods ? I mean, the whole point is we move our untestable, wiring up logic to main methods, and then I see them in the reports. That just seems backwards to me. But should we whitelist, filter ? I dunno. Just throwing it out there.
Mar 31, 2009
Checked in a change not to report issues for main() methods. I think you should still be avoiding big costs in main, though. If you call a bunch of new's, that's ok, as long as you don't call the expensive methods on those objects. If you create the object graph, then call the start() method on one of them, everything can still be nice and testable since there is a seam even for the object with the start(). In fact, I'm concerned that having a high cost, but then not reporting an issue for it, will be misleading on the issues report. So we should just decide one way or the other.
Mar 31, 2009
(No comment was entered for this change.)
Summary: Main methods should not show up in reports
|► Sign in to add a comment|