Skip to content

Commit 55597c7

Browse files
Updated README.md for release 0.7.0
1 parent 035e141 commit 55597c7

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

README.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ This tool for Java codebases will help you identify what you should refactor fir
55
- Highly Coupled classes
66
- Class Cycles (with cycle images!)
77

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
911
- PMD's God Class Rule
1012
- PMD's Coupling Between Objects
11-
- Cycle analysis on your source code using [JavaParser](https://javaparser.org/) and [JGraphT](https://jgrapht.org/)
1213

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)!
1418

1519
The graphs generated in the report will look similar to this one:
1620
![image info](./RefactorFirst_Sample_Report.png)
@@ -28,15 +32,15 @@ If you use an old JDK release of your chosen Java version, you may encounter iss
2832
Run the following command from the root of your project (the source code does not need to be built):
2933

3034
```bash
31-
mvn org.hjug.refactorfirst.plugin:refactor-first-maven-plugin:0.6.1:htmlReport
35+
mvn org.hjug.refactorfirst.plugin:refactor-first-maven-plugin:0.7.0:htmlReport
3236
```
3337
View the report at ```target/site/refactor-first-report.html```
3438

3539
### [As Part of GitHub Actions Output](https://github.blog/news-insights/product-news/supercharging-github-actions-with-job-summaries/)
3640
This will generate a simplified HTML report (no graphs or images) as the output of a GitHub Action step
3741
```bash
3842
mvn -B clean test \
39-
org.hjug.refactorfirst.plugin:refactor-first-maven-plugin:0.6.1:simpleHtmlReport \
43+
org.hjug.refactorfirst.plugin:refactor-first-maven-plugin:0.7.0:simpleHtmlReport \
4044
&& echo "$(cat target/site/refactor-first-report.html)" >> $GITHUB_STEP_SUMMARY
4145
```
4246

@@ -49,7 +53,7 @@ Add the following to your project in the build section. **showDetails** will sh
4953
<plugin>
5054
<groupId>org.hjug.refactorfirst.plugin</groupId>
5155
<artifactId>refactor-first-maven-plugin</artifactId>
52-
<version>0.6.1</version>
56+
<version>0.7.0</version>
5357
<!-- optional -->
5458
<configuration>
5559
<showDetails>false</showDetails>
@@ -70,13 +74,32 @@ A RefactorFirst report will show up in the site report when you run ```mvn site`
7074
<plugin>
7175
<groupId>org.hjug.refactorfirst.plugin</groupId>
7276
<artifactId>refactor-first-maven-plugin</artifactId>
73-
<version>0.6.1</version>
77+
<version>0.7.0</version>
7478
</plugin>
7579
...
7680
</plugins>
7781
</reporting>
7882
```
7983

84+
## Configuraiton Options
85+
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+
80103
If you see an error similar to
81104
```
82105
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
116139
and then (assuming Maven is installed) run
117140

118141
```bash
119-
mvn org.hjug.refactorfirst.plugin:refactor-first-maven-plugin:0.6.1:htmlReport
142+
mvn org.hjug.refactorfirst.plugin:refactor-first-maven-plugin:0.7.0:htmlReport
120143
```
121144

122145
## Viewing the Report

0 commit comments

Comments
 (0)