mamuz / PhpDependencyAnalysis

Static code analysis to find violations in a dependency graph
http://mamuz.github.io/PhpDependencyAnalysis/
MIT License
561 stars 45 forks source link

Multiple output formats for one analysis run #30

Open cawolf opened 7 years ago

cawolf commented 7 years ago

Hi @mamuz,

while using your project I encountered an annoying little issue: whenever I run an analysis in a single given format, but I wanted e.g. a JSON and a SVG result, I had to execute the analysis 2 times with 2 slightliy different configurations, meaning I had my builds to run half as fast as I wished I could.

As far as I see, a small modification wthin the AbstractStrategy (iterating over 2 new arrays) would overcome my issue. I could also imagine a fallback to accept strings as configuration in order to ensure BC.

What do you think about this enhancement? Would it add a benefit to your project? Or should I work around my issue on my side?

Best regards, @cawolf