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
+31-8Lines changed: 31 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,16 @@ This tool for Java codebases will help you identify what you should refactor fir
5
5
- Highly Coupled classes
6
6
- Class Cycles (with cycle images!)
7
7
8
-
It scans your Git repository and runs:
8
+
It scans your Git repository generates a single page application by runing:
9
+
- Cycle analysis on your source code using the [OpenRewrite](https://github.com/openrewrite/rewrite) Java parser and [JGraphT](https://jgrapht.org/)
10
+
- What-if analysis to identify the most optimal relationships in a class cycle to remove
9
11
- PMD's God Class Rule
10
12
- PMD's Coupling Between Objects
11
-
- Cycle analysis on your source code using [JavaParser](https://javaparser.org/) and [JGraphT](https://jgrapht.org/)
12
13
13
-
Cycle analysis is performed based on class field types and method signature types at this time (more to come!).
14
+
Code map viewers are powered by [3D Force Graph](https://vasturiano.github.io/3d-force-graph), [sigma.js](https://www.sigmajs.org/), and [GraphViz DOT](https://graphviz.org/docs/layouts/dot/)
15
+
<br>If there are more than 4000 classes + relationships, a simplified 3D viewer will be used to avoid slowdowns. Features will be toggleable in the 3D UI in a future release.
16
+
17
+
Take a look at the [Spring Petclinic REST project sample report](https://rawcdn.githack.com/refactorfirst/RefactorFirst/035e141f7a42920a32d96f74e819ad370fece5e7/spring-petclinic-rest-report.html)!
14
18
15
19
The graphs generated in the report will look similar to this one:
16
20

@@ -28,15 +32,15 @@ If you use an old JDK release of your chosen Java version, you may encounter iss
28
32
Run the following command from the root of your project (the source code does not need to be built):
Care has been taken to use sensible defaults, though if you wish to override these defaults you can specify the following parameters.
86
+
Specify with -D if running on the command line. e.g. ```-DbackEdgeAnalysisCount=0 `DanalyzeCycles=false``` or in the configuration section (as in the above examples) if including in a Maven build.
87
+
88
+
|Option|Action|Default|
89
+
|------|------|-------|
90
+
|showDetails|Shows God Class metrics|false|
91
+
|backEdgeAnalysisCount|Number of back edges in a cycle to analyze. <br>If total number of back edges is greater than the value specified, it analyzes the number of minimum weight edges specified.<br>**If 0 is specified, all back edges will be analyzed**|50|
92
+
|analyzeCycles|Analyzes the 10 largest cycles (will be configurable in the future)|true|
93
+
|minifyHtml|Minifies the generated HTML report. Only available on ```htmlReport``` and ```simpleHtmlReport``` goals. May cause issues with large reports.|false|
94
+
|excludeTests|Exclude test classes from analysis|true|
95
+
|testSrcDirectory|Excludes classes containing this pattern from analysis|```src/test``` and ```src/test```|
96
+
|projectName|The name of your project to be displayed on the report|Your Maven project name|
97
+
|projectVersion|The version of your project to be displayed on the report|Your Maven project version|
98
+
|outputDirectory|The location the project report will be written|```${projectDir}/target/site/refactor-first-report.html```
99
+
100
+
101
+
### Seeing Errors?
102
+
80
103
If you see an error similar to
81
104
```
82
105
Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed: A required class was missing while executing org.apache.maven.plugins:maven-site-plugin:3.3:site: org/apache/maven/doxia/siterenderer/DocumentContent
@@ -116,7 +139,7 @@ I would like to create a Gradle plugin and (possibly) support non-conventional p
0 commit comments