pmdtester 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/build.sh +91 -0
  3. data/.ci/files/env.gpg +1 -0
  4. data/.github/workflows/build.yml +39 -0
  5. data/.gitignore +9 -0
  6. data/.hoerc +1 -1
  7. data/.rubocop.yml +6 -2
  8. data/.ruby-version +1 -0
  9. data/History.md +40 -0
  10. data/Manifest.txt +24 -9
  11. data/README.rdoc +45 -30
  12. data/Rakefile +5 -3
  13. data/config/all-java.xml +1 -1
  14. data/config/design.xml +1 -1
  15. data/config/projectlist_1_0_0.xsd +2 -1
  16. data/config/projectlist_1_1_0.xsd +31 -0
  17. data/lib/pmdtester.rb +8 -7
  18. data/lib/pmdtester/builders/liquid_renderer.rb +73 -0
  19. data/lib/pmdtester/builders/pmd_report_builder.rb +102 -78
  20. data/lib/pmdtester/builders/project_builder.rb +100 -0
  21. data/lib/pmdtester/builders/project_hasher.rb +126 -0
  22. data/lib/pmdtester/builders/rule_set_builder.rb +92 -47
  23. data/lib/pmdtester/builders/simple_progress_logger.rb +4 -4
  24. data/lib/pmdtester/builders/summary_report_builder.rb +62 -131
  25. data/lib/pmdtester/collection_by_file.rb +55 -0
  26. data/lib/pmdtester/parsers/options.rb +19 -0
  27. data/lib/pmdtester/parsers/pmd_report_document.rb +74 -29
  28. data/lib/pmdtester/parsers/projects_parser.rb +2 -4
  29. data/lib/pmdtester/pmd_branch_detail.rb +29 -19
  30. data/lib/pmdtester/pmd_configerror.rb +23 -24
  31. data/lib/pmdtester/pmd_error.rb +34 -34
  32. data/lib/pmdtester/pmd_report_detail.rb +9 -12
  33. data/lib/pmdtester/pmd_tester_utils.rb +55 -0
  34. data/lib/pmdtester/pmd_violation.rb +66 -28
  35. data/lib/pmdtester/project.rb +21 -48
  36. data/lib/pmdtester/report_diff.rb +179 -111
  37. data/lib/pmdtester/resource_locator.rb +4 -0
  38. data/lib/pmdtester/runner.rb +66 -64
  39. data/pmdtester.gemspec +27 -36
  40. data/resources/_includes/diff_pill_row.html +6 -0
  41. data/resources/css/bootstrap.min.css +7 -0
  42. data/resources/css/datatables.min.css +36 -0
  43. data/resources/css/pmd-tester.css +131 -0
  44. data/resources/js/bootstrap.min.js +7 -0
  45. data/resources/js/code-snippets.js +66 -0
  46. data/resources/js/datatables.min.js +726 -0
  47. data/resources/js/jquery-3.2.1.slim.min.js +4 -0
  48. data/resources/js/jquery.min.js +2 -0
  49. data/resources/js/popper.min.js +5 -0
  50. data/resources/js/project-report.js +136 -0
  51. data/resources/project_diff_report.html +205 -0
  52. data/resources/project_index.html +102 -0
  53. metadata +64 -20
  54. data/.travis.yml +0 -40
  55. data/lib/pmdtester/builders/diff_builder.rb +0 -31
  56. data/lib/pmdtester/builders/diff_report/configerrors.rb +0 -50
  57. data/lib/pmdtester/builders/diff_report/errors.rb +0 -71
  58. data/lib/pmdtester/builders/diff_report/violations.rb +0 -77
  59. data/lib/pmdtester/builders/diff_report_builder.rb +0 -99
  60. data/lib/pmdtester/builders/html_report_builder.rb +0 -56
  61. data/resources/css/maven-base.css +0 -155
  62. data/resources/css/maven-theme.css +0 -171
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7fc01c7d15cd3aa78253be622bbd569540e04527d01856685ab89ab0cf2e443
4
- data.tar.gz: ad1dcb50bf17bcc75aa93ae74d2e912f79a3c3b9e9e11ba5241f224d79c554d8
3
+ metadata.gz: e64c3cfe9a13d470c09fee954176bda926c290cf1c518f889cac6ed8581a2ccd
4
+ data.tar.gz: '091269caea70c24b02b138a6eb1b5292896c7fd7fffe3f3c38c8811dfa951db9'
5
5
  SHA512:
6
- metadata.gz: 5eb5982c5253d95de53b3ed214ce82c88a94a98dce6b346e95bac0a0c21ae9ac58f79347c4a10399b4d1e07909787ccd8fa1314c0cab7b8bd5b41fdadf2183cd
7
- data.tar.gz: fc74eb7bd0e530fc9504f80f10e02df95b9c9ef76ea364ef6d9fef3825e0da4ebb95d9611741f80a1021ca09cba5ad60d26dc021c6e46f0ad8e26bbe8bff81a2
6
+ metadata.gz: 744b359c60b9ac0f8349c0b94ebbd8923f09fdd06aea2ad5d88f8d983ea86f33f9a9105385efc9f553b35690c30dbac8533577a68301ef1ef5700e01964212a1
7
+ data.tar.gz: 6ee40e8927802f6e70e299629bec1b950feb0c388ced3e74a8982a014d4895f3dd76c04c055e91d4ef9881c037c189c9cfbbafe9cfc252c9a760cf9aaf0c17b0
@@ -0,0 +1,91 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -e
4
+
5
+
6
+ function build_regression_tester() {
7
+ echo "::group::Install OpenJDK 8+11"
8
+ install_openjdk 8
9
+ install_openjdk 11 # last one is the default
10
+ echo "::endgroup::"
11
+
12
+ echo "::group::Install dependencies"
13
+ gem install bundler
14
+ bundle config set --local path vendor/bundle
15
+ bundle install
16
+ echo "::endgroup::"
17
+
18
+ echo "::group::Build with rake"
19
+ bundle exec rake check_manifest
20
+ bundle exec rake rubocop
21
+ bundle exec rake clean test
22
+ echo "::endgroup::"
23
+
24
+ echo "::group::Run Integration Tests"
25
+ bundle exec rake clean integration-test
26
+ echo "::endgroup::"
27
+
28
+ echo "::group::Build Package"
29
+ bundle exec rake install_gem
30
+ bundle exec pmdtester -h
31
+ echo "::endgroup::"
32
+
33
+ # builds on forks or builds for pull requests stop here
34
+ if [[ "${PMD_CI_REPO}" != "pmd/pmd-regression-tester" || -n "${PMD_CI_PULL_REQUEST_NUMBER}" ]]; then
35
+ exit 0
36
+ fi
37
+
38
+ # if this is a release build from a tag...
39
+ if [[ "${PMD_CI_REPO}" == "pmd/pmd-regression-tester" && "${PMD_CI_GIT_REF}" == refs/tags/* ]]; then
40
+ echo "::group::Publish to rubygems"
41
+ setup_secrets
42
+
43
+ git stash --all
44
+ gem build pmdtester.gemspec
45
+ gem push pmdtester-*.gem
46
+ echo "::endgroup::"
47
+ fi
48
+
49
+ }
50
+
51
+ ## helper functions
52
+
53
+ function install_openjdk() {
54
+ OPENJDK_VERSION=$1
55
+ echo "Installing OpenJDK ${OPENJDK_VERSION}"
56
+ JDK_OS=linux
57
+ COMPONENTS_TO_STRIP=1 # e.g. openjdk-11.0.3+7/bin/java
58
+ DOWNLOAD_URL=$(curl --silent -X GET "https://api.adoptopenjdk.net/v3/assets/feature_releases/${OPENJDK_VERSION}/ga?architecture=x64&heap_size=normal&image_type=jdk&jvm_impl=hotspot&os=${JDK_OS}&page=0&page_size=1&project=jdk&sort_method=DEFAULT&sort_order=DESC&vendor=adoptopenjdk" \
59
+ -H "accept: application/json" \
60
+ | jq -r ".[0].binaries[0].package.link")
61
+ OPENJDK_ARCHIVE=$(basename ${DOWNLOAD_URL})
62
+ CACHE_DIR=${HOME}/.cache/openjdk
63
+ TARGET_DIR=${HOME}/openjdk${OPENJDK_VERSION}
64
+ mkdir -p ${CACHE_DIR}
65
+ mkdir -p ${TARGET_DIR}
66
+ if [ ! -e ${CACHE_DIR}/${OPENJDK_ARCHIVE} ]; then
67
+ echo "Downloading from ${DOWNLOAD_URL} to ${CACHE_DIR}"
68
+ curl --location --output ${CACHE_DIR}/${OPENJDK_ARCHIVE} "${DOWNLOAD_URL}"
69
+ else
70
+ echo "Skipped download, file ${CACHE_DIR}/${OPENJDK_ARCHIVE} already exists"
71
+ fi
72
+ tar --extract --file ${CACHE_DIR}/${OPENJDK_ARCHIVE} -C ${TARGET_DIR} --strip-components=${COMPONENTS_TO_STRIP}
73
+ export JAVA_HOME="${TARGET_DIR}"
74
+ export PATH="${TARGET_DIR}/bin:${PATH}"
75
+ java -version
76
+ echo "Java is available at ${TARGET_DIR}"
77
+ }
78
+
79
+ function setup_secrets() {
80
+ echo "Setting up secrets..."
81
+ # Required secrets are: GEM_HOST_API_KEY
82
+ local -r env_file=".ci/files/env"
83
+ printenv PMD_CI_SECRET_PASSPHRASE | gpg --batch --yes --decrypt \
84
+ --passphrase-fd 0 \
85
+ --output ${env_file} ${env_file}.gpg
86
+ source ${env_file} >/dev/null 2>&1
87
+ rm ${env_file}
88
+ }
89
+
90
+
91
+ build_regression_tester
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,39 @@
1
+ name: build
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ tags:
7
+ - '**'
8
+ pull_request:
9
+ branches: [ master ]
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ continue-on-error: false
15
+ if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
16
+ steps:
17
+ - uses: actions/checkout@v2
18
+ - uses: actions/cache@v2
19
+ with:
20
+ path: |
21
+ ~/.m2/repository
22
+ ~/.cache
23
+ vendor/bundle
24
+ key: ${{ runner.os }}-${{ hashFiles('pmdtester.gemspec') }}
25
+ restore-keys: |
26
+ ${{ runner.os }}-
27
+ - name: Set up Ruby
28
+ uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: 2.7
31
+ - name: Build
32
+ run: .ci/build.sh
33
+ shell: bash
34
+ env:
35
+ MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=180 -Dmaven.wagon.http.retryHandler.count=3
36
+ PMD_CI_SECRET_PASSPHRASE: ${{ secrets.PMD_CI_SECRET_PASSPHRASE }}
37
+ PMD_CI_REPO: ${{ github.repository }}
38
+ PMD_CI_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
39
+ PMD_CI_GIT_REF: ${{ github.ref }}
@@ -0,0 +1,9 @@
1
+ pkg/
2
+ doc/
3
+ Gemfile.lock
4
+ .project
5
+ .idea
6
+ .bundle
7
+ target/
8
+ vendor/
9
+ localtests/
data/.hoerc CHANGED
@@ -1 +1 @@
1
- exclude: !ruby/regexp /tmp$|\.(git|idea|project)|target|test\/|Gemfile\.lock|\.bundle\/|install-jdk.sh|vendor\/cache/
1
+ exclude: !ruby/regexp /tmp$|\.(git|idea)\/|\.project|target|test\/|Gemfile\.lock|\.bundle\/|vendor\/bundle|localtests/
@@ -1,7 +1,7 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.4
4
+ TargetRubyVersion: 2.7
5
5
  Include:
6
6
  - 'lib/**/*'
7
7
  - 'test/**/*'
@@ -14,12 +14,16 @@ AllCops:
14
14
  - 'vendor/**/*'
15
15
 
16
16
  Metrics/LineLength:
17
- Max: 100
17
+ Max: 120
18
18
 
19
19
  Metrics/MethodLength:
20
20
  Exclude:
21
21
  - 'lib/pmdtester/parsers/options.rb'
22
22
 
23
+ Metrics/ClassLength:
24
+ Exclude:
25
+ - '**/*'
26
+
23
27
  Metrics/BlockLength:
24
28
  Exclude:
25
29
  - 'lib/pmdtester/parsers/options.rb'
@@ -0,0 +1 @@
1
+ 2.7
data/History.md CHANGED
@@ -1,3 +1,43 @@
1
+ # 1.1.0 / 2020-12-05
2
+
3
+ ## New and Noteworthy
4
+
5
+ * At least ruby 2.7 is required.
6
+
7
+ * Typeresolution is now supported by two new tags in the project-list.xml file:
8
+ `build-command` and `auxclasspath-command`. For details, see pull request [#72](https://github.com/pmd/pmd-regression-tester/pull/72).
9
+
10
+ * As part of [#74](https://github.com/pmd/pmd-regression-tester/pull/74) runner now returns a single hash
11
+ with the summarized values instead of multiple numbers:
12
+
13
+ ```
14
+ summary = PmdTester::Runner.new(argv).run
15
+ puts summary
16
+ # {:errors=>{:new=>0, :removed=>0}, :violations=>{:new=>0, :removed=>0, :changed=>0}, :configerrors=>{:new=>0, :removed=>0}}
17
+ ```
18
+
19
+ * As part of [#73](https://github.com/pmd/pmd-regression-tester/issues/73) and [#78](https://github.com/pmd/pmd-regression-tester/pull/78)
20
+ a improved HTML report is now generated with the following features:
21
+ * searchable table for violations with filters by rule/file/kind (added, removed, changed)
22
+ * summary of changes by rule
23
+ * code snippets for the violations
24
+
25
+ ## Fixed Issues
26
+
27
+ * [#48](https://github.com/pmd/pmd-regression-tester/issues/48): Support auxclasspath / typeresolution
28
+ * [#67](https://github.com/pmd/pmd-regression-tester/pull/67): Report contains errors having nil filename
29
+ * [#68](https://github.com/pmd/pmd-regression-tester/pull/68): Don't generate a dynamic ruleset if not needed
30
+ * [#69](https://github.com/pmd/pmd-regression-tester/pull/69): Detect single rules with auto-gen-config
31
+ * [#70](https://github.com/pmd/pmd-regression-tester/pull/70): Add link to PR on github in HTML report
32
+ * [#73](https://github.com/pmd/pmd-regression-tester/issues/73): Better HTML presentation for diff report
33
+ * [#74](https://github.com/pmd/pmd-regression-tester/pull/74): Merge violations that have just changed messages
34
+ * [#75](https://github.com/pmd/pmd-regression-tester/pull/75): Add new option "--error-recovery"
35
+ * [#76](https://github.com/pmd/pmd-regression-tester/pull/76): Speedup XML parsing
36
+ * [#79](https://github.com/pmd/pmd-regression-tester/pull/79): Add new configuration option "--baseline-download-url"
37
+ * [#80](https://github.com/pmd/pmd-regression-tester/pull/80): Cache and reuse pmd builds
38
+
39
+ ## External Contributions
40
+
1
41
  # 1.0.1 / 2020-07-08
2
42
 
3
43
  This is a bugfix release.
@@ -1,7 +1,11 @@
1
+ .ci/build.sh
2
+ .ci/files/env.gpg
3
+ .github/workflows/build.yml
4
+ .gitignore
1
5
  .hoerc
2
6
  .rubocop.yml
3
7
  .rubocop_todo.yml
4
- .travis.yml
8
+ .ruby-version
5
9
  Gemfile
6
10
  History.md
7
11
  LICENSE
@@ -13,18 +17,17 @@ config/all-java.xml
13
17
  config/design.xml
14
18
  config/project-list.xml
15
19
  config/projectlist_1_0_0.xsd
20
+ config/projectlist_1_1_0.xsd
16
21
  lib/pmdtester.rb
17
- lib/pmdtester/builders/diff_builder.rb
18
- lib/pmdtester/builders/diff_report/configerrors.rb
19
- lib/pmdtester/builders/diff_report/errors.rb
20
- lib/pmdtester/builders/diff_report/violations.rb
21
- lib/pmdtester/builders/diff_report_builder.rb
22
- lib/pmdtester/builders/html_report_builder.rb
22
+ lib/pmdtester/builders/liquid_renderer.rb
23
23
  lib/pmdtester/builders/pmd_report_builder.rb
24
+ lib/pmdtester/builders/project_builder.rb
25
+ lib/pmdtester/builders/project_hasher.rb
24
26
  lib/pmdtester/builders/rule_set_builder.rb
25
27
  lib/pmdtester/builders/simple_progress_logger.rb
26
28
  lib/pmdtester/builders/summary_report_builder.rb
27
29
  lib/pmdtester/cmd.rb
30
+ lib/pmdtester/collection_by_file.rb
28
31
  lib/pmdtester/parsers/options.rb
29
32
  lib/pmdtester/parsers/pmd_report_document.rb
30
33
  lib/pmdtester/parsers/projects_parser.rb
@@ -32,11 +35,23 @@ lib/pmdtester/pmd_branch_detail.rb
32
35
  lib/pmdtester/pmd_configerror.rb
33
36
  lib/pmdtester/pmd_error.rb
34
37
  lib/pmdtester/pmd_report_detail.rb
38
+ lib/pmdtester/pmd_tester_utils.rb
35
39
  lib/pmdtester/pmd_violation.rb
36
40
  lib/pmdtester/project.rb
37
41
  lib/pmdtester/report_diff.rb
38
42
  lib/pmdtester/resource_locator.rb
39
43
  lib/pmdtester/runner.rb
40
44
  pmdtester.gemspec
41
- resources/css/maven-base.css
42
- resources/css/maven-theme.css
45
+ resources/_includes/diff_pill_row.html
46
+ resources/css/bootstrap.min.css
47
+ resources/css/datatables.min.css
48
+ resources/css/pmd-tester.css
49
+ resources/js/bootstrap.min.js
50
+ resources/js/code-snippets.js
51
+ resources/js/datatables.min.js
52
+ resources/js/jquery-3.2.1.slim.min.js
53
+ resources/js/jquery.min.js
54
+ resources/js/popper.min.js
55
+ resources/js/project-report.js
56
+ resources/project_diff_report.html
57
+ resources/project_index.html
@@ -4,7 +4,9 @@ home :: https://pmd.github.io
4
4
  code :: https://github.com/pmd/pmd-regression-tester
5
5
  bugs :: https://github.com/pmd/pmd-regression-tester/issues
6
6
 
7
- build-status :: {<img src="https://travis-ci.com/pmd/pmd-regression-tester.svg?branch=master" alt="Build Status" />}[https://travis-ci.com/pmd/pmd-regression-tester]
7
+ build-status :: {<img src="https://github.com/pmd/pmd-regression-tester/workflows/build/badge.svg?branch=master" alt="Build Status" />}[https://github.com/pmd/pmd-regression-tester/actions?query=workflow%3Abuild]
8
+
9
+ gem-version :: {<img src="https://badge.fury.io/rb/pmdtester.svg" alt="Gem Version" />}[https://rubygems.org/gems/pmdtester]
8
10
 
9
11
  == DESCRIPTION:
10
12
 
@@ -18,24 +20,27 @@ on a list of standard projects(Spring Framework, Hibernate, Solr, etc.)
18
20
  == SYNOPSIS:
19
21
 
20
22
  === Options:
21
- -r, --local-git-repo path to the local PMD repository
22
- -b, --base-branch name of the base branch in local PMD repository
23
- -p, --patch-branch name of the patch branch in local PMD repository
24
- -bc, --base-config path to the base PMD configuration file default:PMDTESTER_INSTALLED_DIR/config/all-java.xml
25
- -pc, --patch-config path to the patch PMD configuration file default:PMDTESTER_INSTALLED_DIR/config/all-java.xml
26
- -c, --config path to the base and patch PMD configuration file
27
- -l, --list-of-project path to the file which contains the list of standard projects default:PMDTESTER_INSTALLED_DIR/config/project-list.xml
28
- -m, --mode the mode of the tool: 'local', 'online' or 'single'
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 default:PMDTESTER_INSTALLED_DIR/config/all-java.xml
27
+ -pc, --patch-config path to the patch PMD configuration file default:PMDTESTER_INSTALLED_DIR/config/all-java.xml
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 default:PMDTESTER_INSTALLED_DIR/config/project-list.xml
30
+ -m, --mode the mode of the tool: 'local', 'online' or 'single'
29
31
  single: Set this option to 'single' if your patch branch contains changes
30
32
  for any option that can't work on master/base branch
31
33
  online: Set this option to 'online' if you want to download
32
34
  the PMD report of master/base branch rather than generating it locally
33
35
  local: Default option is 'local', PMD reports for the base and patch branches are generated locally.
34
36
 
35
- -t, --threads Sets the number of threads used by PMD. Set threads to 0 to disable multi-threading processing. default:1
36
- -f, --html-flag whether to not generate the html diff report in single mode
37
- -a, --auto-gen-config whether to generate configurations automatically based on branch differences,this option only works in online and local mode
38
- -d, --debug whether change log level to DEBUG to see more information
37
+ -t, --threads Sets the number of threads used by PMD. Set threads to 0 to disable multi-threading processing. default:1
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
+ --keep-reports whether to keep old reports and skip running PMD again if possible
41
+ -d, --debug whether change log level to DEBUG to see more information
42
+ --error-recovery enable error recovery mode when executing PMD. Might help to analyze errors.
43
+ --baseline-download-url download url prefix from where to download the baseline in online mode default:https://sourceforge.net/projects/pmd/files/pmd-regression-tester/
39
44
  -v, --version
40
45
  -h, --help
41
46
 
@@ -60,19 +65,24 @@ The tool creates the following folders:
60
65
  │ ├── PROJECT_NAME_1
61
66
  │ ├── ......
62
67
  │ └── PROJECT_NAME_n
63
- └── reports
64
- ├── BASE_BRANCH_NAME <- the base baseline is placed here
65
- ├── PATCH_BRANCH_NAME <- the patch baseline is placed here
66
- └── diff
67
- ├── index.xml <- the summary report of diff reports
68
- ├── base_config.xml <- the resources of the summary report
69
- ├── patch_config.xml <- the resources fo the summary report
70
- ├── css <- css reources are placed here
71
- ├── PROJECT_NAME_1
72
- └── index.xml <- the diff report of PROJECT_1
73
- ├── .......
74
- └── PROJECT_NAME_n
75
- └── index.xml <- the diff report of PROJECT_N
68
+ ├── reports
69
+ ├── BASE_BRANCH_NAME <- the base baseline is placed here
70
+ ├── PATCH_BRANCH_NAME <- the patch baseline is placed here
71
+ └── diff
72
+ ├── index.html <- the summary report of diff reports
73
+ ├── base_config.xml <- pmd config from the base branch
74
+ ├── patch_config.xml <- pmd config from the patch branch
75
+ ├── css <- css resources are placed here
76
+ ├── js <- js resources
77
+ │ ├── PROJECT_NAME_1
78
+ │ │ ├── project_data.js <- contains the violations as js/json
79
+ │ │ └── index.html <- the diff report of PROJECT_1
80
+ │ ├── .......
81
+ │ └── PROJECT_NAME_n
82
+ │ ├── project_data.js <- contains the violations as js/json
83
+ │ └── index.xml <- the diff report of PROJECT_N
84
+ ├── pmd-bin-<version>-<branch_name>-<sha1> <- cached pmd builds that are reused
85
+ └── pmd-bin-....
76
86
 
77
87
  ==== The baseline format
78
88
  branch_name
@@ -90,7 +100,7 @@ The tool creates the following folders:
90
100
 
91
101
  == REQUIREMENTS:
92
102
 
93
- * Ruby 2.4.1 or higher
103
+ * Ruby 2.7 or higher
94
104
 
95
105
  === Runtime dependency
96
106
 
@@ -133,6 +143,11 @@ The tool creates the following folders:
133
143
 
134
144
  * Update +History.md+ (version and date)
135
145
  * Update +lib/pmdtester.rb+ (version)
136
- * Commit ("Prepare release x.y.z"), tag, push. Travis will build and publish the new gem.
137
- * Update History.md and lib/pmdtester.rb for the next development version
138
- ("Prepare next development version x.y.z-SNAPSHOT").
146
+ * Run "bundle exec rake verify" and add new +pmdtester.gemspec+ (new version)
147
+ * Commit ("Prepare release x.y.z").
148
+ * Tag this commit ("git tag vx.y.z").
149
+ * Update History.md and lib/pmdtester.rb for the next development version,
150
+ run again "bundle exec rake verify"
151
+ * Commit ("Prepare next development version x.y.z-SNAPSHOT").
152
+ * Push to master.
153
+ * Push the tag. Github Actions will build and publish the new gem
data/Rakefile CHANGED
@@ -16,10 +16,12 @@ hoe = Hoe.spec 'pmdtester' do
16
16
 
17
17
  developer 'Andreas Dangel', 'andreas.dangel@pmd-code.org'
18
18
  developer 'Binguo Bao', 'djydewang@gmail.com'
19
+ developer 'Clément Fournier', 'clement.fournier76@gmail.com'
19
20
 
20
- self.clean_globs = %w[target/reports/**/* target/test/**/* Gemfile.lock]
21
+ self.clean_globs = %w[target/reports/**/* target/test/**/* target/dynamic-config.xml Gemfile.lock]
21
22
  self.extra_deps += [['nokogiri', '~> 1.8'], ['slop', '~> 4.6'], ['differ', '~> 0.1'],
22
- ['rufus-scheduler', '~> 3.5']]
23
+ ['rufus-scheduler', '~> 3.5'], ['logger-colors', '~> 1.0'],
24
+ ['liquid', '>= 4.0']]
23
25
  self.extra_dev_deps += [
24
26
  ['hoe-bundler', '~> 1.5'],
25
27
  ['hoe-git', '~> 1.6'],
@@ -30,7 +32,7 @@ hoe = Hoe.spec 'pmdtester' do
30
32
  ['test-unit', '~> 3.2'],
31
33
  ['rdoc', ['>= 4.0', '< 7']]
32
34
  ]
33
- spec_extras[:required_ruby_version] = '>= 2.2'
35
+ spec_extras[:required_ruby_version] = '>= 2.7'
34
36
 
35
37
  license 'BSD-2-Clause'
36
38
  end
@@ -3,7 +3,7 @@
3
3
  <ruleset name="All Java Rules"
4
4
  xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
5
5
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6
- xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
6
+ xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
7
7
  <description>Every Java Rule in PMD</description>
8
8
 
9
9
  <rule ref="category/java/bestpractices.xml" />
@@ -3,7 +3,7 @@
3
3
  <ruleset name="Design"
4
4
  xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
5
5
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6
- xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
6
+ xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
7
7
 
8
8
  <description>
9
9
  The Design ruleset contains rules that flag suboptimal code implementations. Alternate approaches