refactorfirst / RefactorFirst

Identifies and prioritizes God Classes and Highly Coupled classes in Java codebases you should refactor first.
Apache License 2.0
360 stars 39 forks source link

Add true class name #43

Closed chriswininger closed 2 years ago

chriswininger commented 2 years ago

Class name and file name were being conflated. In most cases the two are the same but not always.

I renamed the existing className property in RankedDisharmony to fileName to reflect what it actually is.

I added a new className property which is set to the actual className.

To get class name passed into the logic where RankedDisharmony is constructed I also had to update the GodClass definition to include className as well as file name.

The HTML and CVS report output should not change. I updated them to call getFileName from ranked disharmony rather than getClassName. This preserves existing behavior.

The only output which should change is the JSON report which will now expose both fileName and className, letting the consumer choose which they care about.

ghost commented 2 years ago
👇 Click on the image for a new way to code review - Make big changes easier — review code in small groups of related files - Know where to start — see the whole change at a glance - Take a code tour — explore the change with an interactive tour - Make comments and review — all fully sync’ed with github [Try it now!](https://app.codesee.io/r/reviews?pr=43&src=https%3A%2F%2Fgithub.com%2Fjimbethancourt%2FRefactorFirst)

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend