Reputation: 59
We are doing the our code review manually. It's eating our more time to review the each and every file. We are checking below generic items for all the files. It would be good if any automated script in Perl / Php for code review.
Kindly help to create automated tool for code review.
Thanks in advance.
Upvotes: 0
Views: 56
Reputation: 35198
I'm amused by the idea of you or someone manually counting the tabs.
Count tabs:
perl -ne '$c += () = /\t/g; END{print qq{$c}}' file.pl
or
perl -ne '$c += tr/\t//; END {print qq{$c}}' file.pl
And similarly for white spaces:
perl -ne '$c += tr/ //; END {print qq{$c}}' file.pl
Upvotes: 1