Inventory of fixtures
October 11, 2014
So our last post gave us the basic tool to see how intricated our classes were. So let's do the boring job to get everything we need and launch our commands on the corresponding files.
Caveat: you may be tempted to compare all the headers imported by source files in a module using comm. Reading man comm could make you think this is a good idea. It isn't, because compare line by line, instead of searching each line of a file in the other one. Therefore I strongly recommend you the following perl oneliner, from this SO answer:
perl -ne 'print if ($seen{$} .= @ARGV) =~ /10$/' importedheaders.txt headers.txt | wc -lAnd here is our results. Analysis is coming but can you already see the big problem and the quick win we have at hands ?