Skip to content

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

Closed
@Bananeweizen

Description

@Bananeweizen

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?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions