You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-3Lines changed: 30 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
# RefactorFirst
2
2
3
-
This tool for Java codebases will help you identify the God Classes you should refactor first.
4
-
The graph generated in the report will look similar to this one:
3
+
This tool for Java codebases will help you identify the God Classes and classes with High Coupling you should refactor first.
4
+
It runs PMD's God Class Rule and Coupling Between Objects rule and scans your Git repository history.
5
+
6
+
The graphs generated in the report will look similar to this one:
5
7

6
8
7
9
## There are several ways to run the analysis on your codebase:
@@ -50,8 +52,32 @@ Not supported as of Version 0.2.0 due to CVE-2020-13936
50
52
</reporting>
51
53
```
52
54
55
+
## But I'm using Gradle / my project layout isn't typical!
56
+
I would like to create a Gradle plugin and (possibly) support non-conventional projects in the future, but in the meantime you can create a dummy POM file in the same directory as your .git directory:
Once the plugin finishes executing (it may take a while for a large / old codebase), open the file **target/site/refactor-first-report.html** in the root of the project. It will contain a graph similar to the one above, and a table that lists God classes in the recommended order that they should be refactored. The classes in the top left of the graph are the easiest to refactor while also having the biggest positive impact to team productivity.
75
+
Once the plugin finishes executing (it may take a while for a large / old codebase), open the file **target/site/refactor-first-report.html** in the root of the project. It will contain a graph similar to the one above, and a table that lists God classes in the recommended order that they should be refactored. The classes in the top left of the graph are the easiest to refactor while also having the biggest positive impact to team productivity.
76
+
If highly coupled classes are detected, a graph and table listing Highly Coupled Classes in will be generated.
77
+
78
+
## I have the report. Now What???
79
+
Work with your Product Owner to prioritize the technical debt that has been identified. It may help to explain it as hidden negative value that is slowing team porductivity.
80
+
If you have IntelliJ Ultimate, you can install the [Method Reference Diagram](https://plugins.jetbrains.com/plugin/7996-java-method-reference-diagram) plugin to help you determine how the identified God classes and Highly Coupled classes can be refactored.
55
81
56
82
57
83
## Additional Details
@@ -67,6 +93,7 @@ There is still much to be done. Your feedback and collaboration would be greatl
67
93
If you find this plugin useful, please star this repository and share with your friends & colleagues and on social media.
68
94
69
95
## Future Plans
96
+
* Identify class cycles and prioritize them.
70
97
* Add a Gradle plugin.
71
98
* Incorporate Unit Test coverage metrics to quickly identify the safety of refactoring a God class.
72
99
* Incorporate bug counts per God class to the Impact (Y-Axis) calculation.
0 commit comments