Inventory of fixtures

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$/' imported_headers.txt headers.txt | wc -l

And here is our results. Analysis is coming but can you already see the big problem and the quick win we have at hands ?

Capture d’écran 2014-10-09 à 16.59.03

Advertisements

One thought on “Inventory of fixtures

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s