Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecipeRunStats source file count exceeds number of files in project #4876

Open
Bananeweizen opened this issue Jan 9, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Bananeweizen
Copy link
Contributor

What is the smallest, simplest way to reproduce the problem?

Enable datatables on a small project, open RecipeRunStats.csv and sort by first column (edited source files).

What did you see instead?

image

That's from a project with 2600 files in the repo (Java, Maven, adoc, ....), therefore I would expect none of the numbers to be larger than 2600.

If you agree to that assumption, then

seems to be wrong. This is called unconditionally inside 2 nested loops for recipes and files, thereby incrementing the counter by files*recipes or something like that.
It might need to be moved inside the if visitor.isAcceptable() condition.

This bug does not create any wrong code with rewrite recipes. It just makes it harder to use the numbers in the data tables to look for "extreme" recipes or similar oddities.

Are you interested in contributing a fix to OpenRewrite?

@Bananeweizen Bananeweizen added the bug Something isn't working label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant