@@ -15,19 +15,92 @@ The diff report can be generated according to the base and patch branch of PMD
15
15
on a list of standard projects(Spring Framework, Hibernate, Solr, etc.)
16
16
17
17
== SYNOPSIS:
18
-
19
- * FIX (code sample of usage)
18
+ ===Options:
19
+ -r, --local-git-repo path to the local PMD repository
20
+ -b, --base-branch name of the base branch in local PMD repository
21
+ -p, --patch-branch name of the patch branch in local PMD repository
22
+ -bc, --base-config path to the base PMD configuration file default:PMDTESTER_INSTALLED_DIR/config/all-java.xml
23
+ -pc, --patch-config path to the patch PMD configuration file default:PMDTESTER_INSTALLED_DIR/config/all-java.xml
24
+ -c, --config path to the base and patch PMD configuration file
25
+ -l, --list-of-project path to the file which contains the list of standard projects default:PMDTESTER_INSTALLED_DIR/config/project-list.xml
26
+ -m, --mode the mode of the tool: 'local', 'online' or 'single'
27
+ single: Set this option to 'single' if your patch branch contains changes
28
+ for any option that can't work on master/base branch
29
+ online: Set this option to 'online' if you want to download
30
+ the PMD report of master/base branch rather than generating it locally
31
+ local: Default option is 'local', PMD reports for the base and patch branches are generated locally.
32
+
33
+ -f, --html-flag whether to not generate the html diff report in single mode
34
+ -a, --auto-gen-config whether to generate configurations automatically based on branch differences,this option only works in online and local mode
35
+ -d, --debug whether change log level to DEBUG to see more information
36
+ -v, --version
37
+ -h, --help
38
+ === Quick start
39
+ ==== Run local mode
40
+ pmdtester -b master -p YOUR_DEVELOPMENT_BRANCH
41
+ ==== Run single mode
42
+ pmdtester -p YOUR_DEVELOPMENT_BRANCH -pc CONFIG_ONLY_CONTAINS_NEW_PMD_JAVA_RULE -m single
43
+ ==== Run online mode
44
+ pmdtester -b master -p YOUR_DEVELOPMENT_BRANCH -m online
45
+ === Output
46
+ The tool creates the following folders:
47
+ target
48
+ ├── repositories <- the analyzed projects are cloned here
49
+ │ ├── PROJECT_NAME_1
50
+ │ ├── ......
51
+ │ └── PROJECT_NAME_n
52
+ └── reports
53
+ ├── BASE_BRANCH_NAME <- the base baseline is placed here
54
+ ├── PATCH_BRANCH_NAME <- the patch baseline is placed here
55
+ └── diff
56
+ ├── index.xml <- the summary report of diff reports
57
+ ├── base_config.xml <- the resources of the summary report
58
+ ├── patch_config.xml <- the resources fo the summary report
59
+ ├── css <- css reources are placed here
60
+ ├── PROJECT_NAME_1
61
+ └── index.xml <- the diff report of PROJECT_1
62
+ ├── .......
63
+ └── PROJECT_NAME_n
64
+ └── index.xml <- the diff report of PROJECT_N
65
+ ====The baseline format
66
+ branch_name
67
+ ├── branch_info.json
68
+ ├── config.xml
69
+ ├── STANDARD_PROJECT_NAME_1
70
+ │ ├── report_info.json
71
+ │ └── pmd_report.xml
72
+ ├── ......................
73
+ │ ├── report_info.json
74
+ │ └── pmd_report.xml
75
+ └── STANDARD_PROJECT_NAME_n
76
+ ├── report_info.info
77
+ └── pmd_report.xml
20
78
21
79
== REQUIREMENTS:
22
-
23
- * FIX (list of requirements)
24
-
80
+ * Ruby 2.4.1 or higher
81
+ === Runtime dependency
82
+ nokogiri ~> 1.8.2
83
+ slop ~> 4.6.2
84
+ === Development dependency
85
+ hoe ~> 3.17
86
+ hoe-bundler ~> 1.2
87
+ hoe-git ~> 1.6
88
+ minitest ~> 5.10.1
89
+ mocha ~> 1.5.0
90
+ rdoc < 6, >= 4.0
91
+ rubocop ~> 0.56.0
92
+ test-unit ~> 3.2.3
93
+
25
94
== INSTALL:
26
95
27
- * FIX (sudo gem install, anything else)
96
+ gem install pmdtester --pre
28
97
29
98
== DEVELOPERS:
30
-
31
- You can list all tasks by running `rake -T`.
99
+ git clone https://github.com/pmd/pmd-regression-tester.git
100
+ cd pmd-regression-tester
101
+ gem install bundler
102
+ bundle install
103
+ rake verify # run this command before commit your changes
104
+
32
105
33
106
0 commit comments