Arbitrary amount of results shown
im-blawton opened this issue · 4 comments
Hi,
I'm using this on a legacy package with 3 source directories:
- src/
- lib/
- inc/
The results don't seem to show all the files. I've set filesToShow in the churn.yaml to higher numbers like 40-50 but I'm only getting about 7 results when I specify all three dirs in the yaml file, despite there being about 50 classes in the src/ alone, all with commits after the commitsSince value.
I know my config file is working because the results change if I alter other settings like commitsSince or minScoreToShow.
If I run churn on the individual directories, I see results on files that don't show up in the list when I run churn on all three directories at the same time.
Is this a bug or am I missing something?
Here is my config file:
minScoreToShow: 0
parallelJobs: 50
commitsSince: 3 years ago
directoriesToScan:
- src/
- inc/
- lib/
If I only run churn on the src/ dir I only see about 5 results. If I run churn on all three source dirs I only see about 7 results and only one of them is in the src/ dir, so the other 4 have gone missing.
Also, that same src/ file has different scores in each result.
ALSO, the lib dir doesn't get scanned at all. All three dirs are in the package root and the lib dir has 3 files containing only flat functions, no classes. I get the following error when scanning that dir:
In Assert.php line 1696:
Expected a value greater than 0. Got: 0
Some of these files aren't getting scanned and I cannot imagine why
Hi @im-blawton thanks for the detailed report.
Sorry to say that currently I have very little extra time to work on this project so I don't anticipate looking into this in the near future. But perhaps there are others out there who will look into it more.
If you end up finding the issue please feel free to list it here and also pull requests will be eagerly accepted. Thanks very much!
Hi @bmitch Thanks for that. What would you say is the likelihood of you having time to review a PR in the 10-14 days, if I made one? I'm working in a company where we'd like to refactor some legacy code and it'd be good to have a tool like this and not have to make one myself, from scratch.
Appreciate you're super busy so just asking for a realistic timescale, given that the last commit looks like it was back in Feb. Would you consider adding more collaborators to the project?
Thanks for your time and effort :)
The error you got has been fixed by #261.
This correction will be part of the next release (1.3.0).
Some of these files aren't getting scanned and I cannot imagine why
They are scanned but they are not displayed if their score is below minScoreToShow
. In your case minScoreToShow
is set to 0 while the score is a value between -1 and 1.
So if you set minScoreToShow
to -1 you'll see more files in the report.