sebastianbergmann / phploc

A tool for quickly measuring the size of a PHP project.
BSD 3-Clause "New" or "Revised" License
2.34k stars 167 forks source link

Add new feature for comparing LOC between directories and commits #183

Closed maidmaid closed 5 years ago

maidmaid commented 6 years ago

Imagine an old app like below that you would like migrate in the long run :

your-legacy-app/
├── legacy/
└── src/

It would be nice if phploc could provide information about how the migration is being. Basically, we could imagine something like :

$ phploc compare modern:src legacy:legacy --between commit1 commit2

which could return something like :

commit modern LOC legacy LOC modern % legacy %
1 0 100 0% 100%
2 7 (+7) 93 (-7) 7% (+7%) 93% (-7%)
maidmaid commented 6 years ago

ping @sebastianbergmann :)

sebastianbergmann commented 6 years ago

Interesting functionality, for sure, I am not sure (yet) whether this belongs into PHPLOC or if it should be a separate tool that operates on the output of PHPLOC.

maidmaid commented 6 years ago

Thanks for your answer @sebastianbergmann. I have thought about the relevance of this feature into phploc. Here, my opinion :

First, Let's remind the punchline of phploc project :

A tool for quickly measuring the size of a PHP project.

This suggested feature just want to compare these different done measures (and through the time). IMHO, we are staying in the same original purpose, it's just another command which would depend on the logic of the main one.

Moreover, it would be really convenient for any PHP user to have such command into phploc, which is already known by the community.

muhammedeminakbulut commented 5 years ago

I think it could be a separate tool which can combine output from 'a' tool.