pmdtester 1.0.0.pre.beta3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f7a664829a0e913162fb40f38781976cf9260941e02f535baad1bb2debbe180
4
- data.tar.gz: f2805406fcccc9c00e3d009817f7fefa82c79cccc5ca1a08317daf4182f089a1
3
+ metadata.gz: a01837c60abe0048b0e65aaec642e970e3bf2fa6f126f2e33c5429a33dce5aaa
4
+ data.tar.gz: 776503e819fa70e809de9f2633cb464cf40f4758449679edc967649b08716e31
5
5
  SHA512:
6
- metadata.gz: 294c1d8e5eb098d609bfa351612222d7fa7a76002cc43e4ade678cfd74fa1bfac723fa24e0d77ba3b23d084126c3c1aebedf784599be266fd71f318b252f82ef
7
- data.tar.gz: 25df0d2de24c75a2bd0750d8025fabc0bad1c5d0f2c742eefbfc4884ffc664f1b6c46f7e2477a68daa50c753c0b575dda1b880df9868dd6d31b34c224d6a7882
6
+ metadata.gz: f411366e6cfae2693955512010ea9bec3431ff085df45de372526250a044beb82163b8f78be7920551b41e0ae9f543f93a068030429ebbcc846c45969946f65e
7
+ data.tar.gz: '0569c7bcb84fa271eff1b32b3836db2efb6209a17462c3e39de97f3cf7d0a69455b710fe4e810d32717732ba615c05211f462af0019b2c01190796a8c9861576'
data/.hoerc CHANGED
@@ -1 +1 @@
1
- exclude: !ruby/regexp /tmp$|\.(git|idea)|target|test\/|Gemfile\.lock/
1
+ exclude: !ruby/regexp /tmp$|\.(git|idea)|target|test\/|Gemfile\.lock|\.bundle\/|install-jdk.sh|vendor\/cache/
data/.rubocop.yml CHANGED
@@ -2,9 +2,16 @@ inherit_from: .rubocop_todo.yml
2
2
 
3
3
  AllCops:
4
4
  TargetRubyVersion: 2.4
5
+ Include:
6
+ - 'lib/**/*'
7
+ - 'test/**/*'
5
8
  Exclude:
9
+ # pmdtester.gemspec and Gemfile are generated
10
+ - 'pmdtester.gemspec'
11
+ - 'Gemfile'
6
12
  - 'target/**/*'
7
13
  - 'test/resources/**/*'
14
+ - 'vendor/**/*'
8
15
 
9
16
  Metrics/LineLength:
10
17
  Max: 100
data/.rubocop_todo.yml CHANGED
@@ -1,27 +1,26 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-07-12 16:57:46 +0800 using RuboCop version 0.56.0.
3
+ # on 2018-11-25 11:00:37 +0100 using RuboCop version 0.51.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 22
9
+ # Offense count: 30
10
10
  Metrics/AbcSize:
11
11
  Max: 47
12
12
 
13
- # Offense count: 3
13
+ # Offense count: 6
14
14
  # Configuration parameters: CountComments.
15
15
  Metrics/ClassLength:
16
- Max: 174
16
+ Max: 135
17
17
 
18
- # Offense count: 33
18
+ # Offense count: 38
19
19
  # Configuration parameters: CountComments.
20
20
  Metrics/MethodLength:
21
- Max: 35
21
+ Max: 22
22
22
 
23
- # Offense count: 5
23
+ # Offense count: 3
24
24
  Naming/AccessorMethodName:
25
25
  Exclude:
26
26
  - 'lib/pmdtester/builders/pmd_report_builder.rb'
27
- - 'lib/pmdtester/parsers/projects_parser.rb'
data/.travis.yml CHANGED
@@ -1,6 +1,18 @@
1
1
  language: ruby
2
- jdk: oraclejdk9
2
+ before_install:
3
+ - LOCAL_DIR=${HOME}/.cache/openjdk
4
+ - TARGET_DIR=${HOME}/openjdk11
5
+ - mkdir -p ${LOCAL_DIR}
6
+ - mkdir -p ${TARGET_DIR}
7
+ - DOWNLOAD_URL="https://pmd-code.org/openjdk/jdk-11.0.7%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz"
8
+ - OPENJDK_ARCHIVE=$(basename $DOWNLOAD_URL)
9
+ - if [ ! -e ${LOCAL_DIR}/${OPENJDK_ARCHIVE} ]; then wget --directory-prefix ${LOCAL_DIR} --timestamping --continue ${DOWNLOAD_URL}; fi
10
+ - tar --extract --file ${LOCAL_DIR}/${OPENJDK_ARCHIVE} -C ${TARGET_DIR} --strip-components=1
11
+ - export JAVA_HOME="${TARGET_DIR}"
12
+ - export PATH="${TARGET_DIR}/bin:${PATH}"
13
+ - java -version
3
14
  script:
15
+ - rake check_manifest
4
16
  - rake rubocop
5
17
  - rake clean test
6
18
  - rake clean integration-test
@@ -14,9 +26,15 @@ before_deploy:
14
26
  deploy:
15
27
  provider: rubygems
16
28
  api_key:
17
- secure: wXntKsCZseVjujUBnEJd0yYYARrBbIcAGACkfvNiUzGhuSN8Vil5ub6TMKu25vIOa+J122atCVMkAGm0g/3vB+h/5RAnMLxGDIWO9FWT2eGX4xtPkA/PbH6ejdJ5UVqUbUu9CTAehAvr6mYCzyBnmkzoyjD2CGaojy7RsvU+5+qeXAxkOhaY0UWgxUWbWwpwRuSt3BmHT+9ri8eEliXCL78yMRNzDLo5DxS6vC/RgrfrQ38mvoHjnniSN85GR2crYqdv40oTng6YZGuRR8FDxIQbu0VRmL/OsHCA1Ltt2m9FOk04EdP30mUsRawyJAB/5RfgVr7thMNd7PdQ9izsMleeg6lPsIW7NWWKoq0ZpImhsXOvWpQQqU4+vcew+QiFL9xthXsvKVs1wulb9y34dwLS7Wj5RInPdSSFtHihissSgBPQlifdK4IKBRw56LZ9OyBSQ7nid5tyvEfRzAWQCl5jrPnILInz2SB0zFtbMvn+699vsWYyn25w/0pGvWS1qhHLakQVLfRM7X8Yz3C5p4mjSwfBoICnN1kwXnezbdHDwbhXACqqN+UWKc1gWuMYQ22vHccUmOuJof4ooFkiZAY+ccwxfmd5TdAX60fkGSgNSn9+hyCarqGG/rU85b+EXpU/Qc7a08cuiIM0X2CVOKFM7E75KDjoi74nS/k0s2E=
29
+ secure: "PMohVxVpupi3qKmSWjny6ASPKiWpyZxMTluARs15tiRR4Pco3Ko+Z+Nk2F6XNZkY4q4zudS91JGtYeGzuBknI/tFB9S1LjR5RDe9cUbETlhpazBCaRvVFt0K8okb9JAWfVi+mnCG5saBn0Osxv/PKS2sVr/3dK9JFVncaYfRhIZfhB/LcdHMLpnlv94sr60SGPA8ITz3pj1dKe6E2wfqQjgD8RNOOLxtcTFeEZVHDuJn0gsKz+ou2Dyzth+2SksKKboosodWXNbAIx5xg+iVLZgGFluQknZ130G0PA6vJzMLWgLEjUtFDV1QtE80jP7LhuMOKXaXHa6NghHL7h3TiBO9/2SEdHSdIq5NeMm2f8qttLNqI15cgGolyUGd+K43tAdvNuJws+wbQsj53htGFLvSKPfwTxipn1Ppa1s6/bSeUQvtj/kXO6MnVdwTBNjlm791DaG8sC4WbvppLvrKPfpvqGoOfWj9h5PlB8SsaHyDtOB6oCYE354RxLJxaI6b4hcxleyz7mPmoPcKQjcPSM8i004lCCNAmPm0VMW/yTi1Z1iBq6+1OiW7fe6txJi9zCPhMzziz1EA0oQYBgu99Uy9wjHh8CkWXtZDx+WSYRxCZOJ6kFN72dgYQbIsn4kxzrjwCp+NN0woDPR0FXcuePNgAz2hBtAvbKdOC2OCQVw="
18
30
  on:
19
31
  tags: true
20
32
  skip_cleanup: true
21
33
  gem: pmdtester
22
34
  gemspec: pmdtester.gemspec
35
+
36
+ cache:
37
+ directories:
38
+ - vendor/bundle
39
+ - "$HOME/.rvm/"
40
+ - "$HOME/.cache/openjdk"
data/Gemfile CHANGED
@@ -3,17 +3,6 @@
3
3
  # DO NOT EDIT THIS FILE. Instead, edit Rakefile, and run `rake bundler:gemfile`.
4
4
 
5
5
  source "https://rubygems.org/"
6
-
7
- gem "nokogiri", "~>1.8.2"
8
- gem "slop", "~>4.6.2"
9
-
10
- gem "hoe-bundler", "~>1.2", :group => [:development, :test]
11
- gem "hoe-git", "~>1.6", :group => [:development, :test]
12
- gem "minitest", "~>5.10.1", :group => [:development, :test]
13
- gem "mocha", "~>1.5.0", :group => [:development, :test]
14
- gem "rubocop", "~>0.56.0", :group => [:development, :test]
15
- gem "test-unit", "~>3.2.3", :group => [:development, :test]
16
- gem "rdoc", ">=4.0", "<6", :group => [:development, :test]
17
- gem "hoe", "~>3.17", :group => [:development, :test]
6
+ gemspec
18
7
 
19
8
  # vim: syntax=ruby
data/History.md CHANGED
@@ -1,3 +1,39 @@
1
+ # 1.0.0 / 2020-04-25
2
+
3
+ ## New and Noteworthy
4
+
5
+ First stable release.
6
+
7
+ ## Fixed Issues
8
+
9
+ * [#35](https://github.com/pmd/pmd-regression-tester/issues/35): exclude-pattern hasn't been implemented
10
+ * [#37](https://github.com/pmd/pmd-regression-tester/issues/37): Render stack traces properly
11
+ * [#38](https://github.com/pmd/pmd-regression-tester/issues/38): Improve Danger messages
12
+ * [#40](https://github.com/pmd/pmd-regression-tester/issues/40): NoMethodError on beta3
13
+ * [#42](https://github.com/pmd/pmd-regression-tester/issues/42): Installing the snapshot version of pmdtester locally from github
14
+ * [#46](https://github.com/pmd/pmd-regression-tester/issues/46): Support multithreaded execution of PMD
15
+ * [#47](https://github.com/pmd/pmd-regression-tester/issues/47): Reuse the already built PMD binary for PR checks
16
+ * [#49](https://github.com/pmd/pmd-regression-tester/issues/49): Support comparing two error stacktraces
17
+ * [#50](https://github.com/pmd/pmd-regression-tester/issues/50): Differences due to different locale settings
18
+ * [#57](https://github.com/pmd/pmd-regression-tester/issues/57): Support configuration errors in the report
19
+ * [#60](https://github.com/pmd/pmd-regression-tester/issues/60): Display a simple progress report
20
+
21
+ ## External Contributions
22
+
23
+ * [#33](https://github.com/pmd/pmd-regression-tester/pull/33): Ignore changes to test code of PMD when generating dynamic rule sets - [BBG](https://github.com/djydewang)
24
+ * [#34](https://github.com/pmd/pmd-regression-tester/pull/34): Clear old reports before generating new differences regression reports - [BBG](https://github.com/djydewang)
25
+ * [#36](https://github.com/pmd/pmd-regression-tester/pull/36): Implements exclude-pattern - [BBG](https://github.com/djydewang)
26
+ * [#39](https://github.com/pmd/pmd-regression-tester/pull/39): Render stacktraces properly - [BBG](https://github.com/djydewang)
27
+ * [#41](https://github.com/pmd/pmd-regression-tester/pull/41): Fixes NoMethodError in Project class - [BBG](https://github.com/djydewang)
28
+ * [#43](https://github.com/pmd/pmd-regression-tester/pull/43): Adds pmdtester.gemspec file - [BBG](https://github.com/djydewang)
29
+ * [#44](https://github.com/pmd/pmd-regression-tester/pull/44): Improve Danger messages & Increase the readability of the summary report - [BBG](https://github.com/djydewang)
30
+ * [#45](https://github.com/pmd/pmd-regression-tester/pull/45): Removes the exit statement in RuleSetBuilder Class - [BBG](https://github.com/djydewang)
31
+ * [#51](https://github.com/pmd/pmd-regression-tester/pull/51): Add the JDK version and locale info to the summary table of the diff report - [BBG](https://github.com/djydewang)
32
+ * [#52](https://github.com/pmd/pmd-regression-tester/pull/52): Get the result of command 'java -version' from stderr rather than stdout - [BBG](https://github.com/djydewang)
33
+ * [#53](https://github.com/pmd/pmd-regression-tester/pull/53): Support comparing the two error stacktraces - [BBG](https://github.com/djydewang)
34
+ * [#54](https://github.com/pmd/pmd-regression-tester/pull/54): Support multithreaded execution of PMD - [BBG](https://github.com/djydewang)
35
+ * [#61](https://github.com/pmd/pmd-regression-tester/pull/61): Display a simple progress report every 2 minutes - [BBG](https://github.com/djydewang)
36
+
1
37
  # 1.0.0.beta3 / 2018-08-01
2
38
 
3
39
  Note: This is a beta release. The pmdtester is feature complete,
@@ -11,6 +47,7 @@ but might contain bugs.
11
47
  * [#31](https://github.com/pmd/pmd-regression-tester/pull/31): Fix color scheme for diff report, add default values for various options - [BBG](https://github.com/djydewang)
12
48
  * [#32](https://github.com/pmd/pmd-regression-tester/pull/32): Update Readme.rdoc - [BBG](https://github.com/djydewang)
13
49
 
50
+
14
51
  # 1.0.0.beta2 / 2018-07-17
15
52
 
16
53
  * First release of pmdtester
data/Manifest.txt CHANGED
@@ -15,16 +15,21 @@ config/project-list.xml
15
15
  config/projectlist_1_0_0.xsd
16
16
  lib/pmdtester.rb
17
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
18
21
  lib/pmdtester/builders/diff_report_builder.rb
19
22
  lib/pmdtester/builders/html_report_builder.rb
20
23
  lib/pmdtester/builders/pmd_report_builder.rb
21
24
  lib/pmdtester/builders/rule_set_builder.rb
25
+ lib/pmdtester/builders/simple_progress_logger.rb
22
26
  lib/pmdtester/builders/summary_report_builder.rb
23
27
  lib/pmdtester/cmd.rb
24
28
  lib/pmdtester/parsers/options.rb
25
29
  lib/pmdtester/parsers/pmd_report_document.rb
26
30
  lib/pmdtester/parsers/projects_parser.rb
27
31
  lib/pmdtester/pmd_branch_detail.rb
32
+ lib/pmdtester/pmd_configerror.rb
28
33
  lib/pmdtester/pmd_error.rb
29
34
  lib/pmdtester/pmd_report_detail.rb
30
35
  lib/pmdtester/pmd_violation.rb
@@ -32,5 +37,6 @@ lib/pmdtester/project.rb
32
37
  lib/pmdtester/report_diff.rb
33
38
  lib/pmdtester/resource_locator.rb
34
39
  lib/pmdtester/runner.rb
40
+ pmdtester.gemspec
35
41
  resources/css/maven-base.css
36
42
  resources/css/maven-theme.css
data/README.rdoc CHANGED
@@ -1,5 +1,6 @@
1
1
  = pmdtester
2
2
 
3
+ home :: https://pmd.github.io
3
4
  code :: https://github.com/pmd/pmd-regression-tester
4
5
  bugs :: https://github.com/pmd/pmd-regression-tester/issues
5
6
 
@@ -15,7 +16,8 @@ The diff report can be generated according to the base and patch branch of PMD
15
16
  on a list of standard projects(Spring Framework, Hibernate, Solr, etc.)
16
17
 
17
18
  == SYNOPSIS:
18
- ===Options:
19
+
20
+ === Options:
19
21
  -r, --local-git-repo path to the local PMD repository
20
22
  -b, --base-branch name of the base branch in local PMD repository
21
23
  -p, --patch-branch name of the patch branch in local PMD repository
@@ -30,67 +32,84 @@ on a list of standard projects(Spring Framework, Hibernate, Solr, etc.)
30
32
  the PMD report of master/base branch rather than generating it locally
31
33
  local: Default option is 'local', PMD reports for the base and patch branches are generated locally.
32
34
 
35
+ -t, --threads Sets the number of threads used by PMD. Set threads to 0 to disable multi-threading processing. default:1
33
36
  -f, --html-flag whether to not generate the html diff report in single mode
34
37
  -a, --auto-gen-config whether to generate configurations automatically based on branch differences,this option only works in online and local mode
35
38
  -d, --debug whether change log level to DEBUG to see more information
36
- -v, --version
37
- -h, --help
39
+ -v, --version
40
+ -h, --help
41
+
38
42
  === Quick start
43
+
39
44
  ==== Run local mode
40
- pmdtester -b master -p YOUR_DEVELOPMENT_BRANCH
45
+
46
+ pmdtester -b master -p YOUR_DEVELOPMENT_BRANCH -r PATH_TO_LOCAL_PMD_REPO -a
47
+
41
48
  ==== Run single mode
49
+
42
50
  pmdtester -p YOUR_DEVELOPMENT_BRANCH -pc CONFIG_ONLY_CONTAINS_NEW_PMD_JAVA_RULE -m single
51
+
43
52
  ==== Run online mode
44
- pmdtester -b master -p YOUR_DEVELOPMENT_BRANCH -m online
53
+
54
+ pmdtester -b master -p YOUR_DEVELOPMENT_BRANCH -r PATH_TO_LOCAL_PMD_REPO -m online -a
55
+
45
56
  === Output
46
57
  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
58
+ target
59
+ ├── repositories <- the analyzed projects are cloned here
60
+ │ ├── PROJECT_NAME_1
61
+ │ ├── ......
62
+ │ └── 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
57
68
  ├── base_config.xml <- the resources of the summary report
58
69
  ├── 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
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
76
+
77
+ ==== The baseline format
78
+ branch_name
79
+ ├── branch_info.json
80
+ ├── config.xml
81
+ ├── STANDARD_PROJECT_NAME_1
82
+ ├── report_info.json
83
+ │ └── pmd_report.xml
84
+ ├── ......................
85
+ ├── report_info.json
86
+ └── pmd_report.xml
87
+ └── STANDARD_PROJECT_NAME_n
76
88
  ├── report_info.info
77
- └── pmd_report.xml
89
+ └── pmd_report.xml
78
90
 
79
91
  == REQUIREMENTS:
92
+
80
93
  * Ruby 2.4.1 or higher
94
+
81
95
  === Runtime dependency
82
- nokogiri ~> 1.8.2
83
- slop ~> 4.6.2
96
+
97
+ nokogiri ~> 1.8
98
+ slop ~> 4.6
99
+ differ ~> 0.1
100
+ rufus-scheduler ~> 3.5
101
+
84
102
  === Development dependency
85
- hoe ~> 3.17
86
- hoe-bundler ~> 1.2
103
+
104
+ hoe ~> 3.22
105
+ hoe-bundler ~> 1.5
87
106
  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
-
107
+ minitest ~> 5.10
108
+ mocha ~> 1.5
109
+ rdoc < 7, >= 4.0
110
+ rubocop ~> 0.81
111
+ test-unit ~> 3.2
112
+
94
113
  == INSTALL:
95
114
 
96
115
  gem install pmdtester --pre
@@ -99,8 +118,15 @@ The tool creates the following folders:
99
118
  git clone https://github.com/pmd/pmd-regression-tester.git
100
119
  cd pmd-regression-tester
101
120
  gem install bundler
102
- bundle install
103
- rake verify # run this command before commit your changes
104
-
121
+ bundle config set path "vendor/cache"
122
+ bundle install # once
123
+ bundle exec rake verify # run this command before commit your changes
124
+ bundle exec pmdtester ... # run this to directly execute pmdtester from source
105
125
 
126
+ === Releasing
106
127
 
128
+ * Update +History.md+ (version and date)
129
+ * Update +lib/pmdtester.rb+ (version)
130
+ * Commit ("Prepare release x.y.z"), tag, push. Travis will build and publish the new gem.
131
+ * Update History.md and lib/pmdtester.rb for the next development version
132
+ ("Prepare next development version x.y.z-SNAPSHOT").
data/Rakefile CHANGED
@@ -18,25 +18,26 @@ hoe = Hoe.spec 'pmdtester' do
18
18
  developer 'Binguo Bao', 'djydewang@gmail.com'
19
19
 
20
20
  self.clean_globs = %w[target/reports/**/* target/test/**/* Gemfile.lock]
21
- self.extra_deps += [['nokogiri', '~> 1.8.2'], ['slop', '~> 4.6.2']]
22
- self.extra_dev_deps += [
23
- ['hoe-bundler', '~> 1.2'],
21
+ self.extra_deps += [['nokogiri', '~> 1.8'], ['slop', '~> 4.6'], ['differ', '~> 0.1'],
22
+ ['rufus-scheduler', '~> 3.5']]
23
+ self.extra_dev_deps += [
24
+ ['hoe-bundler', '~> 1.5'],
24
25
  ['hoe-git', '~> 1.6'],
25
- ['minitest', '~> 5.10.1'],
26
- ['mocha', '~> 1.5.0'],
27
- ['rubocop', '~> 0.56.0'],
28
- ['test-unit', '~> 3.2.3']
26
+ ['minitest', '~> 5.10'],
27
+ ['mocha', '~> 1.5'],
28
+ # use the same version of rubocop as codacy
29
+ ['rubocop', '~> 0.81'],
30
+ ['test-unit', '~> 3.2'],
31
+ ['rdoc', ['>= 4.0', '< 7']]
29
32
  ]
30
- self.spec_extras[:required_rubygems_version] = '>= 2.4.1'
33
+ spec_extras[:required_ruby_version] = '>= 2.2'
31
34
 
32
35
  license 'BSD-2-Clause'
33
36
  end
34
37
 
35
38
  # Refers to
36
39
  # http://rubocop.readthedocs.io/en/latest/integration_with_other_tools/#rake-integration
37
- RuboCop::RakeTask.new(:rubocop) do |task|
38
- task.patterns = %w[lib/**/*.rb test/**/*.rb]
39
- end
40
+ RuboCop::RakeTask.new(:rubocop)
40
41
 
41
42
  # Run integration test cases
42
43
  Rake::TestTask.new('integration-test') do |task|
@@ -48,9 +49,18 @@ end
48
49
 
49
50
  desc 'generate the pmdtester.gemspec file'
50
51
  task 'hoe:spec' do
51
- File.open("#{hoe.name}.gemspec", "w") { |f| f.write hoe.spec.to_ruby}
52
+ attention_message = '# DO NOT EDIT THIS FILE. Instead, edit Rakefile, and run `rake hoe:spec`.'
53
+ File.open("#{hoe.name}.gemspec", 'w') do |f|
54
+ f.puts attention_message
55
+ f.puts
56
+ f.write hoe.spec.to_ruby
57
+ f.puts
58
+ f.puts attention_message
59
+ end
52
60
  end
53
61
 
54
62
  desc 'verify code quality before committing changes'
55
- task 'verify' => ['clean', 'test', 'rubocop', 'bundler:gemfile', 'git:manifest']
63
+ task 'verify' => ['clean', 'test', 'rubocop', 'git:manifest', 'hoe:spec', 'check_manifest'] do
64
+ Rake.application.invoke_task('bundler:gemfile[,true]')
65
+ end
56
66
  # vim: syntax=ruby
data/lib/pmdtester.rb CHANGED
@@ -4,6 +4,7 @@ require 'logger'
4
4
 
5
5
  require_relative 'pmdtester/cmd'
6
6
  require_relative 'pmdtester/pmd_branch_detail'
7
+ require_relative 'pmdtester/pmd_configerror'
7
8
  require_relative 'pmdtester/pmd_error'
8
9
  require_relative 'pmdtester/pmd_report_detail'
9
10
  require_relative 'pmdtester/pmd_violation'
@@ -12,8 +13,12 @@ require_relative 'pmdtester/report_diff'
12
13
  require_relative 'pmdtester/resource_locator'
13
14
  require_relative 'pmdtester/runner'
14
15
 
16
+ require_relative 'pmdtester/builders/simple_progress_logger'
15
17
  require_relative 'pmdtester/builders/html_report_builder'
16
18
  require_relative 'pmdtester/builders/diff_builder'
19
+ require_relative 'pmdtester/builders/diff_report/violations'
20
+ require_relative 'pmdtester/builders/diff_report/configerrors'
21
+ require_relative 'pmdtester/builders/diff_report/errors'
17
22
  require_relative 'pmdtester/builders/diff_report_builder'
18
23
  require_relative 'pmdtester/builders/pmd_report_builder'
19
24
  require_relative 'pmdtester/builders/rule_set_builder'
@@ -27,7 +32,9 @@ require_relative 'pmdtester/parsers/projects_parser'
27
32
  # and unexpected behaviors will not be introduced to PMD project
28
33
  # after fixing an issue and new rules can work as expected.
29
34
  module PmdTester
30
- VERSION = '1.0.0-beta3'
35
+ VERSION = '1.0.0'
36
+ BASE = 'base'
37
+ PATCH = 'patch'
31
38
 
32
39
  def logger
33
40
  PmdTester.logger