Position "Files" will only be counted if the there is a file in a subfolder.
legionth opened this issue ยท 4 comments
Awesome project I really like it ๐
As the title mentions I crossed over a little issue while working with this project.
Considering the following project structure:
my-project\
scripts\
test.php
hello.php
Executing phploc myproject
will give me the following output
phploc 4.0.1 by Sebastian Bergmann.
Size
Lines of Code (LOC) 28
Comment Lines of Code (CLOC) 4 (14.29%)
Non-Comment Lines of Code (NCLOC) 24 (85.71%)
Logical Lines of Code (LLOC) 5 (17.86%)
Now the following structure:
my-project\
scripts\
test.php
hello.php
As you can see the script moved to another directory. In this case the file was moved to the project root. The following output will also be generated if one of these files move to another sub-directory.
This structure will return the following output with the same command:
phploc 4.0.1 by Sebastian Bergmann.
Directories 1
Files 2
Size
Lines of Code (LOC) 28
Comment Lines of Code (CLOC) 4 (14.29%)
Non-Comment Lines of Code (NCLOC) 24 (85.71%)
Logical Lines of Code (LLOC) 5 (17.86%)
As you see, the "Files" parameter appears now.
So the "Files" parameter is only generated if there are other sub-directories with PHP files
.
I don't know if this is an intentional behavior or this should be considered as a bug.
Would be great if someone could give me feedback about this ๐
I traced this back to 2009 when it appears it originated. It does seem intentional but without context. I've recently ran into the same situation where I'd find the information valuable.
This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity since it was marked as stale. Thank you for your contributions.
@sebastianbergmann I wonder if this issue could be reopened as it seems to have been closed unintentionally by the stale bot?