use pmdtester 1.0.0.pre.beta3
This commit is contained in:
parent
c30c3a3a5e
commit
aa2a363994
10
Dangerfile
10
Dangerfile
@ -1,4 +1,4 @@
|
||||
require 'pmdtester/runner'
|
||||
require 'pmdtester'
|
||||
require 'time'
|
||||
require 'logger'
|
||||
|
||||
@ -6,14 +6,15 @@ require 'logger'
|
||||
|
||||
def run_pmdtester
|
||||
Dir.chdir('..') do
|
||||
argv = ['-r', './pmd', '-b', "#{ENV['TRAVIS_BRANCH']}", '-p', 'FETCH_HEAD', '-m', 'online']
|
||||
argv = ['-r', './pmd', '-b', "#{ENV['TRAVIS_BRANCH']}", '-p', 'FETCH_HEAD', '-m', 'online', '-a']
|
||||
Process.fork do
|
||||
begin
|
||||
runner = PmdTester::Runner.new(argv)
|
||||
runner.run # Optimize: get more information from runner, e.g. introduce new pmd errors?
|
||||
introduce_new_pmd_errors = runner.run
|
||||
warn("The PR may introduce new PMD errors!") if introduce_new_pmd_errors
|
||||
rescue StandardError => e
|
||||
@logger.error "Running pmdtester failed: #{e.msg}"
|
||||
warn("Running pmdtester failed, this message is mainly used to remind the maintainers of PMD.")
|
||||
@logger.error "Running pmdtester failed: #{e.inspect}"
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
@ -37,7 +38,6 @@ def upload_report
|
||||
@logger.info "Successfully uploaded #{tar_filename} to chunk.io"
|
||||
|
||||
# set value of sticky to true and the message is kept after new commits are submited to the PR
|
||||
|
||||
message("Please check the [regression diff report](#{report_url.chomp}/diff/index.html) to make sure that everything is expected", sticky: true)
|
||||
else
|
||||
@logger.error "Error while uploading #{tar_filename} to chunk.io: #{report_url}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user