pmdtester 1.1.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ci/build.sh +87 -55
- data/.ci/inc/fetch_ci_scripts.bash +19 -0
- data/.ci/manual-integration-tests.sh +31 -14
- data/.github/workflows/build.yml +26 -9
- data/.github/workflows/manual-integration-tests.yml +24 -8
- data/.hoerc +1 -1
- data/.rubocop.yml +3 -0
- data/History.md +31 -0
- data/Manifest.txt +4 -2
- data/README.rdoc +26 -25
- data/Rakefile +11 -6
- data/config/project-list.xml +8 -7
- data/config/projectlist_1_2_0.xsd +39 -0
- data/lib/pmdtester/builders/liquid_renderer.rb +60 -3
- data/lib/pmdtester/builders/pmd_report_builder.rb +9 -3
- data/lib/pmdtester/builders/project_builder.rb +14 -9
- data/lib/pmdtester/builders/project_hasher.rb +41 -39
- data/lib/pmdtester/builders/rule_set_builder.rb +116 -75
- data/lib/pmdtester/builders/summary_report_builder.rb +1 -0
- data/lib/pmdtester/parsers/options.rb +5 -0
- data/lib/pmdtester/parsers/pmd_report_document.rb +1 -3
- data/lib/pmdtester/parsers/projects_parser.rb +1 -1
- data/lib/pmdtester/pmd_branch_detail.rb +6 -0
- data/lib/pmdtester/pmd_tester_utils.rb +1 -0
- data/lib/pmdtester/pmd_violation.rb +11 -1
- data/lib/pmdtester/project.rb +24 -11
- data/lib/pmdtester/report_diff.rb +20 -4
- data/lib/pmdtester/runner.rb +8 -3
- data/lib/pmdtester/semver.rb +36 -0
- data/lib/pmdtester.rb +2 -1
- data/pmdtester.gemspec +18 -18
- data/resources/css/pmd-tester.css +17 -1
- data/resources/js/code-snippets.js +48 -15
- data/resources/js/project-report.js +5 -3
- data/resources/project_diff_report.html +9 -0
- data/resources/project_index.html +11 -0
- data/resources/project_pmd_report.html +186 -0
- metadata +26 -30
- data/.ci/files/env.gpg +0 -1
- data/.ci/inc/install-openjdk.inc +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d8994ea3c45ad46bc4fd3266dc6f58984778312f8bd4d08bf072b591eb2328c
|
4
|
+
data.tar.gz: 27127580adda8a0747b93e12968b92f4afdacf117ecd5d9281f285a351b21850
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56ba181fd89c6250f358e324cbfa7ee6fa7d3c449348502b2daac3fbc7943f2e60d484f15703f9d97114ff7139e1dd6bd7f735be1a76c8e6c57cc294b48f5c5b
|
7
|
+
data.tar.gz: d4922834c2665e367fe27107e33ce0b0909c7719e1ff554906bb1e739d4eabfd66626094e8f51547c6a3306fce11a4d9c95737c0292009dd945fc8fa3859cbc3
|
data/.ci/build.sh
CHANGED
@@ -1,67 +1,99 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
# Exit this script immediately if a command/function exits with a non-zero status.
|
5
4
|
set -e
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
echo
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
6
|
+
SCRIPT_INCLUDES="log.bash utils.bash setup-secrets.bash openjdk.bash github-releases-api.bash"
|
7
|
+
# shellcheck source=inc/fetch_ci_scripts.bash
|
8
|
+
source "$(dirname "$0")/inc/fetch_ci_scripts.bash" && fetch_ci_scripts
|
9
|
+
|
10
|
+
function build() {
|
11
|
+
pmd_ci_log_group_start "Install OpenJDK 8+11"
|
12
|
+
pmd_ci_openjdk_install_adoptium 11
|
13
|
+
pmd_ci_openjdk_install_adoptium 8
|
14
|
+
pmd_ci_openjdk_setdefault 11
|
15
|
+
pmd_ci_log_group_end
|
16
|
+
|
17
|
+
pmd_ci_log_group_start "Install dependencies"
|
18
|
+
gem install --user-install bundler
|
19
|
+
bundle config set --local path vendor/bundle
|
20
|
+
bundle install
|
21
|
+
pmd_ci_log_group_end
|
22
|
+
|
23
|
+
echo
|
24
|
+
local version
|
25
|
+
version="$(bundle exec ruby -I. -e 'require "lib/pmdtester"; print PmdTester::VERSION;')"
|
26
|
+
pmd_ci_log_info "======================================================================="
|
27
|
+
pmd_ci_log_info "Building pmd-regression-tester ${version}"
|
28
|
+
pmd_ci_log_info "======================================================================="
|
29
|
+
pmd_ci_utils_determine_build_env pmd/pmd-regression-tester
|
30
|
+
echo
|
31
|
+
|
32
|
+
pmd_ci_log_group_start "Build with rake"
|
33
|
+
bundle exec rake check_manifest
|
34
|
+
bundle exec rake rubocop
|
35
|
+
bundle exec rake clean test
|
36
|
+
pmd_ci_log_group_end
|
37
|
+
|
38
|
+
pmd_ci_log_group_start "Run Integration Tests"
|
39
|
+
bundle exec rake clean integration-test
|
40
|
+
pmd_ci_log_group_end
|
41
|
+
|
42
|
+
pmd_ci_log_group_start "Build Package"
|
43
|
+
bundle exec rake install_gem
|
44
|
+
bundle exec pmdtester -h
|
45
|
+
pmd_ci_log_group_end
|
46
|
+
|
47
|
+
if pmd_ci_utils_is_fork_or_pull_request; then
|
48
|
+
# builds on forks or builds for pull requests stop here
|
37
49
|
exit 0
|
38
50
|
fi
|
39
51
|
|
40
|
-
#
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
52
|
+
# only builds on pmd/pmd-regression-tester continue here
|
53
|
+
pmd_ci_log_group_start "Setup environment"
|
54
|
+
pmd_ci_setup_secrets_private_env
|
55
|
+
pmd_ci_log_group_end
|
56
|
+
|
57
|
+
if isReleaseBuild "$version"; then
|
58
|
+
pmd_ci_log_group_start "Publish to rubygems"
|
59
|
+
gem build pmdtester.gemspec
|
60
|
+
local gempkgfile
|
61
|
+
gempkgfile="$(echo pmdtester-*.gem)"
|
62
|
+
gem push "${gempkgfile}"
|
63
|
+
pmd_ci_log_group_end
|
64
|
+
|
65
|
+
pmd_ci_log_group_start "Update Github Releases"
|
66
|
+
# create a draft github release
|
67
|
+
pmd_ci_gh_releases_createDraftRelease "${PMD_CI_TAG}" "$(git rev-list -n 1 "${PMD_CI_TAG}")"
|
68
|
+
GH_RELEASE="$RESULT"
|
69
|
+
|
70
|
+
# Deploy to github releases
|
71
|
+
pmd_ci_gh_releases_uploadAsset "$GH_RELEASE" "${gempkgfile}"
|
72
|
+
|
73
|
+
# extract the release notes
|
74
|
+
RELEASE_NAME="${version}"
|
75
|
+
BEGIN_LINE=$(grep -n "^# " History.md|head -1|cut -d ":" -f 1)
|
76
|
+
BEGIN_LINE=$((BEGIN_LINE + 1))
|
77
|
+
END_LINE=$(grep -n "^# " History.md|head -2|tail -1|cut -d ":" -f 1)
|
78
|
+
END_LINE=$((END_LINE - 1))
|
79
|
+
RELEASE_BODY="$(head -$END_LINE History.md | tail -$((END_LINE - BEGIN_LINE)))"
|
80
|
+
|
81
|
+
pmd_ci_gh_releases_updateRelease "$GH_RELEASE" "$RELEASE_NAME" "$RELEASE_BODY"
|
82
|
+
|
83
|
+
# Publish release - this sends out notifications on github
|
84
|
+
pmd_ci_gh_releases_publishRelease "$GH_RELEASE"
|
85
|
+
pmd_ci_log_group_end
|
49
86
|
fi
|
50
|
-
|
51
87
|
}
|
52
88
|
|
53
|
-
|
54
|
-
|
55
|
-
function setup_secrets() {
|
56
|
-
echo "Setting up secrets..."
|
57
|
-
# Required secrets are: GEM_HOST_API_KEY
|
58
|
-
local -r env_file=".ci/files/env"
|
59
|
-
printenv PMD_CI_SECRET_PASSPHRASE | gpg --batch --yes --decrypt \
|
60
|
-
--passphrase-fd 0 \
|
61
|
-
--output ${env_file} ${env_file}.gpg
|
62
|
-
source ${env_file} >/dev/null 2>&1
|
63
|
-
rm ${env_file}
|
64
|
-
}
|
89
|
+
function isReleaseBuild() {
|
90
|
+
local version="$1"
|
65
91
|
|
92
|
+
if [[ "${version}" != *-SNAPSHOT && "${PMD_CI_TAG}" != "" ]]; then
|
93
|
+
return 0
|
94
|
+
fi
|
95
|
+
|
96
|
+
return 1
|
97
|
+
}
|
66
98
|
|
67
|
-
|
99
|
+
build
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
function fetch_ci_scripts() {
|
4
|
+
local inc_dir
|
5
|
+
local inc_url
|
6
|
+
inc_dir="$(dirname "$0")/inc"
|
7
|
+
inc_url="${PMD_CI_SCRIPTS_URL:-https://raw.githubusercontent.com/pmd/build-tools/master/scripts}/inc"
|
8
|
+
|
9
|
+
mkdir -p "${inc_dir}"
|
10
|
+
|
11
|
+
for f in ${SCRIPT_INCLUDES}; do
|
12
|
+
if [ ! -e "${inc_dir}/$f" ]; then
|
13
|
+
curl -sSL "${inc_url}/$f" > "${inc_dir}/$f"
|
14
|
+
fi
|
15
|
+
[ "$PMD_CI_DEBUG" = "true" ] && echo "loading ${inc_dir}/$f in ${MODULE:-$0}"
|
16
|
+
# shellcheck source=/dev/null
|
17
|
+
source "${inc_dir}/$f" || exit 1
|
18
|
+
done
|
19
|
+
}
|
@@ -1,20 +1,37 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
# Exit this script immediately if a command/function exits with a non-zero status.
|
5
4
|
set -e
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
SCRIPT_INCLUDES="log.bash utils.bash openjdk.bash"
|
7
|
+
# shellcheck source=inc/fetch_ci_scripts.bash
|
8
|
+
source "$(dirname "$0")/inc/fetch_ci_scripts.bash" && fetch_ci_scripts
|
9
|
+
|
10
|
+
function build() {
|
11
|
+
pmd_ci_log_group_start "Install OpenJDK 8+11"
|
12
|
+
pmd_ci_openjdk_install_adoptium 11
|
13
|
+
pmd_ci_openjdk_install_adoptium 8
|
14
|
+
pmd_ci_openjdk_setdefault 11
|
15
|
+
pmd_ci_log_group_end
|
16
|
+
|
17
|
+
pmd_ci_log_group_start "Install dependencies"
|
18
|
+
gem install --user-install bundler
|
19
|
+
bundle config set --local path vendor/bundle
|
20
|
+
bundle install
|
21
|
+
pmd_ci_log_group_end
|
22
|
+
|
23
|
+
echo
|
24
|
+
local version
|
25
|
+
version="$(bundle exec ruby -I. -e 'require "lib/pmdtester"; print PmdTester::VERSION;')"
|
26
|
+
pmd_ci_log_info "======================================================================="
|
27
|
+
pmd_ci_log_info "Building pmd-regression-tester ${version}"
|
28
|
+
pmd_ci_log_info "======================================================================="
|
29
|
+
pmd_ci_utils_determine_build_env pmd/pmd-regression-tester
|
30
|
+
echo
|
11
31
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
echo "::endgroup::"
|
32
|
+
pmd_ci_log_group_start "Run Manual Integration Tests"
|
33
|
+
bundle exec ruby -I test test/manual_integration_tests.rb
|
34
|
+
pmd_ci_log_group_end
|
35
|
+
}
|
17
36
|
|
18
|
-
|
19
|
-
bundle exec ruby -I test test/manual_integration_tests.rb
|
20
|
-
echo "::endgroup::"
|
37
|
+
build
|
data/.github/workflows/build.yml
CHANGED
@@ -2,11 +2,16 @@ name: build
|
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
branches:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
- master
|
6
8
|
tags:
|
7
9
|
- '**'
|
8
10
|
pull_request:
|
9
|
-
|
11
|
+
schedule:
|
12
|
+
# build it monthly: At 04:30 on day-of-month 1.
|
13
|
+
- cron: '30 4 1 * *'
|
14
|
+
workflow_dispatch:
|
10
15
|
|
11
16
|
jobs:
|
12
17
|
build:
|
@@ -21,19 +26,31 @@ jobs:
|
|
21
26
|
~/.m2/repository
|
22
27
|
~/.cache
|
23
28
|
vendor/bundle
|
24
|
-
|
29
|
+
target/repositories
|
30
|
+
key: v1-${{ runner.os }}-${{ hashFiles('pmdtester.gemspec') }}
|
25
31
|
restore-keys: |
|
26
|
-
|
27
|
-
- name: Set up Ruby
|
32
|
+
v1-${{ runner.os }}-
|
33
|
+
- name: Set up Ruby 2.7
|
28
34
|
uses: ruby/setup-ruby@v1
|
29
35
|
with:
|
30
36
|
ruby-version: 2.7
|
37
|
+
- name: Setup Environment
|
38
|
+
shell: bash
|
39
|
+
run: |
|
40
|
+
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
|
41
|
+
echo "MAVEN_OPTS=-Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3" >> $GITHUB_ENV
|
42
|
+
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/17/scripts" >> $GITHUB_ENV
|
43
|
+
- name: Check Environment
|
44
|
+
shell: bash
|
45
|
+
run: |
|
46
|
+
f=check-environment.sh; \
|
47
|
+
mkdir -p .ci && \
|
48
|
+
( [ -e .ci/$f ] || curl -sSL "${PMD_CI_SCRIPTS_URL}/$f" > ".ci/$f" ) && \
|
49
|
+
chmod 755 .ci/$f && \
|
50
|
+
.ci/$f
|
31
51
|
- name: Build
|
32
52
|
run: .ci/build.sh
|
33
53
|
shell: bash
|
34
54
|
env:
|
35
|
-
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3
|
36
55
|
PMD_CI_SECRET_PASSPHRASE: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
|
37
|
-
|
38
|
-
PMD_CI_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
|
39
|
-
PMD_CI_GIT_REF: ${{ github.ref }}
|
56
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -1,6 +1,10 @@
|
|
1
1
|
name: manual-integration-tests
|
2
2
|
|
3
|
-
on:
|
3
|
+
on:
|
4
|
+
schedule:
|
5
|
+
# build it monthly: At 08:30 on day-of-month 1.
|
6
|
+
- cron: '30 8 1 * *'
|
7
|
+
workflow_dispatch:
|
4
8
|
|
5
9
|
jobs:
|
6
10
|
build:
|
@@ -14,19 +18,31 @@ jobs:
|
|
14
18
|
~/.m2/repository
|
15
19
|
~/.cache
|
16
20
|
vendor/bundle
|
17
|
-
|
21
|
+
target/repositories
|
22
|
+
key: v1-${{ runner.os }}-${{ hashFiles('pmdtester.gemspec') }}
|
18
23
|
restore-keys: |
|
19
|
-
|
20
|
-
- name: Set up Ruby
|
24
|
+
v1-${{ runner.os }}-
|
25
|
+
- name: Set up Ruby 2.7
|
21
26
|
uses: ruby/setup-ruby@v1
|
22
27
|
with:
|
23
28
|
ruby-version: 2.7
|
29
|
+
- name: Setup Environment
|
30
|
+
shell: bash
|
31
|
+
run: |
|
32
|
+
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
|
33
|
+
echo "MAVEN_OPTS=-Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3" >> $GITHUB_ENV
|
34
|
+
echo "PMD_CI_SCRIPTS_URL=https://raw.githubusercontent.com/pmd/build-tools/17/scripts" >> $GITHUB_ENV
|
35
|
+
- name: Check Environment
|
36
|
+
shell: bash
|
37
|
+
run: |
|
38
|
+
f=check-environment.sh; \
|
39
|
+
mkdir -p .ci && \
|
40
|
+
( [ -e .ci/$f ] || curl -sSL "${PMD_CI_SCRIPTS_URL}/$f" > ".ci/$f" ) && \
|
41
|
+
chmod 755 .ci/$f && \
|
42
|
+
.ci/$f
|
24
43
|
- name: Build
|
25
44
|
run: .ci/manual-integration-tests.sh
|
26
45
|
shell: bash
|
27
46
|
env:
|
28
|
-
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3
|
29
47
|
PMD_CI_SECRET_PASSPHRASE: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
|
30
|
-
|
31
|
-
PMD_CI_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
|
32
|
-
PMD_CI_GIT_REF: ${{ github.ref }}
|
48
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/.hoerc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
exclude: !ruby/regexp /tmp$|\.
|
1
|
+
exclude: !ruby/regexp /tmp$|\.git\/|\.idea|\.project|target\/|test\/|Gemfile\.lock|\.bundle\/|vendor\/|localtests\/|\.ci\/inc\/(log|utils|setup-secrets|openjdk|github-releases-api)\.bash|\.ci\/files\/|\.ci\/check-environment\.sh/
|
data/.rubocop.yml
CHANGED
data/History.md
CHANGED
@@ -1,3 +1,34 @@
|
|
1
|
+
# 1.4.0 / 2022-03-24
|
2
|
+
|
3
|
+
## Enhancements
|
4
|
+
|
5
|
+
* [#103](https://github.com/pmd/pmd-regression-tester/pull/103): Support other languages besides java
|
6
|
+
|
7
|
+
# 1.3.0 / 2021-12-17
|
8
|
+
|
9
|
+
## Enhancements
|
10
|
+
|
11
|
+
* [#94](https://github.com/pmd/pmd-regression-tester/issues/94): Improve code snippet preview
|
12
|
+
* [#95](https://github.com/pmd/pmd-regression-tester/issues/95): Add length menu for datatable to allow configurable page size
|
13
|
+
|
14
|
+
## Fixed Issues
|
15
|
+
|
16
|
+
* [#86](https://github.com/pmd/pmd-regression-tester/issues/86): Uncaught TypeError: violation is undefined
|
17
|
+
* [#93](https://github.com/pmd/pmd-regression-tester/issues/93): Line numbers > 1000 are not displayed correctly
|
18
|
+
* [#96](https://github.com/pmd/pmd-regression-tester/issues/96): Fix failing integration tests
|
19
|
+
|
20
|
+
# 1.2.0 / 2021-06-20
|
21
|
+
|
22
|
+
## New and Noteworthy
|
23
|
+
|
24
|
+
* Support for Mercurial is removed. The only SCM supported in the project-list.xml is "git".
|
25
|
+
|
26
|
+
## Fixed Issues
|
27
|
+
|
28
|
+
* [#71](https://github.com/pmd/pmd-regression-tester/issues/71): Include full PMD report
|
29
|
+
* [#89](https://github.com/pmd/pmd-regression-tester/pull/89): Make it possible to select a subpath of cloned directory
|
30
|
+
* [#91](https://github.com/pmd/pmd-regression-tester/pull/91): Filter baseline based on patch config
|
31
|
+
|
1
32
|
# 1.1.2 / 2021-04-20
|
2
33
|
|
3
34
|
This is a bugfix release.
|
data/Manifest.txt
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
.ci/build.sh
|
2
|
-
.ci/
|
3
|
-
.ci/inc/install-openjdk.inc
|
2
|
+
.ci/inc/fetch_ci_scripts.bash
|
4
3
|
.ci/manual-integration-tests.sh
|
5
4
|
.github/workflows/build.yml
|
6
5
|
.github/workflows/manual-integration-tests.yml
|
@@ -21,6 +20,7 @@ config/design.xml
|
|
21
20
|
config/project-list.xml
|
22
21
|
config/projectlist_1_0_0.xsd
|
23
22
|
config/projectlist_1_1_0.xsd
|
23
|
+
config/projectlist_1_2_0.xsd
|
24
24
|
lib/pmdtester.rb
|
25
25
|
lib/pmdtester/builders/liquid_renderer.rb
|
26
26
|
lib/pmdtester/builders/pmd_report_builder.rb
|
@@ -44,6 +44,7 @@ lib/pmdtester/project.rb
|
|
44
44
|
lib/pmdtester/report_diff.rb
|
45
45
|
lib/pmdtester/resource_locator.rb
|
46
46
|
lib/pmdtester/runner.rb
|
47
|
+
lib/pmdtester/semver.rb
|
47
48
|
pmdtester.gemspec
|
48
49
|
resources/_includes/diff_pill_row.html
|
49
50
|
resources/css/bootstrap.min.css
|
@@ -58,3 +59,4 @@ resources/js/popper.min.js
|
|
58
59
|
resources/js/project-report.js
|
59
60
|
resources/project_diff_report.html
|
60
61
|
resources/project_index.html
|
62
|
+
resources/project_pmd_report.html
|
data/README.rdoc
CHANGED
@@ -20,29 +20,30 @@ on a list of standard projects(Spring Framework, Hibernate, Solr, etc.)
|
|
20
20
|
== SYNOPSIS:
|
21
21
|
|
22
22
|
=== Options:
|
23
|
-
-r, --local-git-repo
|
24
|
-
-b, --base-branch
|
25
|
-
-p, --patch-branch
|
26
|
-
-bc, --base-config
|
27
|
-
-pc, --patch-config
|
28
|
-
-c, --config
|
29
|
-
-l, --list-of-project
|
30
|
-
-m, --mode
|
23
|
+
-r, --local-git-repo path to the local PMD repository
|
24
|
+
-b, --base-branch name of the base branch in local PMD repository
|
25
|
+
-p, --patch-branch name of the patch branch in local PMD repository
|
26
|
+
-bc, --base-config path to the base PMD configuration file
|
27
|
+
-pc, --patch-config path to the patch PMD configuration file
|
28
|
+
-c, --config path to the base and patch PMD configuration file
|
29
|
+
-l, --list-of-project path to the file which contains the list of standard projects
|
30
|
+
-m, --mode the mode of the tool: 'local', 'online' or 'single'
|
31
31
|
single: Set this option to 'single' if your patch branch contains changes
|
32
32
|
for any option that can't work on master/base branch
|
33
33
|
online: Set this option to 'online' if you want to download
|
34
34
|
the PMD report of master/base branch rather than generating it locally
|
35
35
|
local: Default option is 'local', PMD reports for the base and patch branches are generated locally.
|
36
36
|
|
37
|
-
-t, --threads
|
38
|
-
-f, --html-flag
|
39
|
-
-a, --auto-gen-config
|
40
|
-
--
|
41
|
-
-
|
42
|
-
|
43
|
-
--
|
44
|
-
-
|
45
|
-
-
|
37
|
+
-t, --threads Sets the number of threads used by PMD. Set threads to 0 to disable multi-threading processing.
|
38
|
+
-f, --html-flag whether to not generate the html diff report in single mode
|
39
|
+
-a, --auto-gen-config whether to generate configurations automatically based on branch differences,this option only works in online and local mode
|
40
|
+
--filter-with-patch-config whether to use patch config to filter baseline result as if --auto-gen-config has been used. This option only works in online mode.
|
41
|
+
--keep-reports whether to keep old reports and skip running PMD again if possible
|
42
|
+
-d, --debug whether change log level to DEBUG to see more information
|
43
|
+
--error-recovery enable error recovery mode when executing PMD. Might help to analyze errors.
|
44
|
+
--baseline-download-url download url prefix from where to download the baseline in online mode
|
45
|
+
-v, --version
|
46
|
+
-h, --help
|
46
47
|
|
47
48
|
=== Quick start
|
48
49
|
|
@@ -104,23 +105,22 @@ The tool creates the following folders:
|
|
104
105
|
|
105
106
|
=== Runtime dependency
|
106
107
|
|
107
|
-
nokogiri
|
108
|
+
nokogiri ~> 1.13
|
108
109
|
slop ~> 4.6
|
109
110
|
differ ~> 0.1
|
110
|
-
rufus-scheduler ~> 3.
|
111
|
+
rufus-scheduler ~> 3.8
|
111
112
|
logger-colors ~> 1.0
|
112
|
-
liquid
|
113
|
+
liquid ~> 5.2
|
113
114
|
|
114
115
|
=== Development dependency
|
115
116
|
|
116
|
-
hoe ~> 3.22
|
117
117
|
hoe-bundler ~> 1.5
|
118
118
|
hoe-git ~> 1.6
|
119
119
|
minitest ~> 5.10
|
120
120
|
mocha ~> 1.5
|
121
|
-
|
122
|
-
|
123
|
-
|
121
|
+
rubocop ~> 0.93
|
122
|
+
test-unit ~> 3.5
|
123
|
+
rdoc ~> 6.4
|
124
124
|
|
125
125
|
== INSTALL:
|
126
126
|
|
@@ -153,4 +153,5 @@ The tool creates the following folders:
|
|
153
153
|
* Commit ("Prepare next development version x.y.z-SNAPSHOT").
|
154
154
|
* Push to master.
|
155
155
|
* Push the tag. Github Actions will build and publish the new gem
|
156
|
-
*
|
156
|
+
* A github release is automatically created, verify it on https://github.com/pmd/pmd-regression-tester/releases
|
157
|
+
* To make pmd's main CI use the new version (in [pmd/pmd](https://github.com/pmd/pmd/)), go to the root directory and run `bundle lock --update`. Commit these changes.
|
data/Rakefile
CHANGED
@@ -19,18 +19,23 @@ hoe = Hoe.spec 'pmdtester' do
|
|
19
19
|
developer 'Clément Fournier', 'clement.fournier76@gmail.com'
|
20
20
|
|
21
21
|
self.clean_globs = %w[target/reports/**/* target/test/**/* target/dynamic-config.xml Gemfile.lock]
|
22
|
-
self.extra_deps += [
|
23
|
-
|
24
|
-
|
22
|
+
self.extra_deps += [
|
23
|
+
['nokogiri', '~> 1.13'],
|
24
|
+
['slop', '~> 4.6'],
|
25
|
+
['differ', '~> 0.1'],
|
26
|
+
['rufus-scheduler', '~> 3.8'],
|
27
|
+
['logger-colors', '~> 1.0'],
|
28
|
+
['liquid', '~> 5.2']
|
29
|
+
]
|
25
30
|
self.extra_dev_deps += [
|
26
31
|
['hoe-bundler', '~> 1.5'],
|
27
32
|
['hoe-git', '~> 1.6'],
|
28
33
|
['minitest', '~> 5.10'],
|
29
34
|
['mocha', '~> 1.5'],
|
30
35
|
# use the same version of rubocop as codacy
|
31
|
-
['rubocop', '~> 0.
|
32
|
-
['test-unit', '~> 3.
|
33
|
-
['rdoc',
|
36
|
+
['rubocop', '~> 0.93'],
|
37
|
+
['test-unit', '~> 3.5'],
|
38
|
+
['rdoc', '~> 6.4']
|
34
39
|
]
|
35
40
|
spec_extras[:required_ruby_version] = '>= 2.7'
|
36
41
|
|
data/config/project-list.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
2
|
|
3
3
|
<projectlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
-
xsi:noNamespaceSchemaLocation="
|
4
|
+
xsi:noNamespaceSchemaLocation="projectlist_1_2_0.xsd">
|
5
5
|
<description>Standard Projects</description>
|
6
6
|
|
7
7
|
<project>
|
@@ -20,10 +20,11 @@ xsi:noNamespaceSchemaLocation="projectlist_1_0_0.xsd">
|
|
20
20
|
<tag>v5.0.6.RELEASE</tag>
|
21
21
|
</project>
|
22
22
|
|
23
|
-
|
24
|
-
<name>
|
25
|
-
<type>
|
26
|
-
<connection>
|
27
|
-
<
|
28
|
-
|
23
|
+
<project>
|
24
|
+
<name>openjdk-11</name>
|
25
|
+
<type>git</type>
|
26
|
+
<connection>https://github.com/openjdk/jdk</connection>
|
27
|
+
<tag>jdk-11+28</tag>
|
28
|
+
<src-subpath>src/java.base</src-subpath>
|
29
|
+
</project>
|
29
30
|
</projectlist>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<?xml version="1.0" ?>
|
2
|
+
<!-- version 1.1.0 -->
|
3
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
4
|
+
<xs:element name="projectlist">
|
5
|
+
<xs:complexType>
|
6
|
+
<xs:sequence>
|
7
|
+
<xs:element name="description" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
8
|
+
<xs:element name="project" type="project" minOccurs="1" maxOccurs="unbounded"/>
|
9
|
+
</xs:sequence>
|
10
|
+
</xs:complexType>
|
11
|
+
</xs:element>
|
12
|
+
<xs:complexType name="project">
|
13
|
+
<xs:sequence>
|
14
|
+
<xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
15
|
+
<xs:element name="type" minOccurs="1" maxOccurs="1">
|
16
|
+
<xs:simpleType>
|
17
|
+
<xs:restriction base="xs:string">
|
18
|
+
<xs:enumeration value="git"/>
|
19
|
+
</xs:restriction>
|
20
|
+
</xs:simpleType>
|
21
|
+
</xs:element>
|
22
|
+
<xs:element name="connection" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
23
|
+
<xs:element name="webview-url" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
24
|
+
<xs:element name="tag" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
25
|
+
<xs:element name="src-subpath" type="xs:string" minOccurs="0" maxOccurs="1" default=".">
|
26
|
+
<xs:annotation>
|
27
|
+
<xs:documentation>
|
28
|
+
Value of the -dir option for the PMD run.
|
29
|
+
The value must be a directory path relative to the root directory of the clone.
|
30
|
+
Defaults to just '.', ie the entire directory.
|
31
|
+
</xs:documentation>
|
32
|
+
</xs:annotation>
|
33
|
+
</xs:element>
|
34
|
+
<xs:element name="exclude-pattern" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
|
35
|
+
<xs:element name="build-command" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
36
|
+
<xs:element name="auxclasspath-command" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
37
|
+
</xs:sequence>
|
38
|
+
</xs:complexType>
|
39
|
+
</xs:schema>
|