Skip to content

Commit cf4b4e1

Browse files
committed
use plugin names
1 parent 2c4457e commit cf4b4e1

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Dangerfile

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ end
3434
# Handle `mvn checkstyle:check` results
3535
cs_report = 'target/checkstyle-result.xml'
3636
unless File.file?(cs_report)
37-
warn("Couldn't find #{cs_report}. CheckStyle result is unknown")
37+
warn("Couldn't find #{cs_report}. maven-checkstyle-plugin result is unknown")
3838
else
3939
errors_count = 0
4040
doc = Nokogiri::XML(File.open(cs_report))
@@ -44,15 +44,15 @@ else
4444
msg = node['message'].sub(/\.$/, '')
4545
file = node.parent['name'].sub(pwd, '')
4646
file = github.html_link("#{file}#L#{line}")
47-
fail("CheckStyle error in #{file}: #{msg}")
47+
fail("maven-checkstyle-plugin error in #{file}: #{msg}")
4848
end
49-
print_errors_summary 'CheckStyle', errors_count, 'https://github.com/php-coder/mystamps/wiki/checkstyle'
49+
print_errors_summary 'maven-checkstyle-plugin', errors_count, 'https://github.com/php-coder/mystamps/wiki/checkstyle'
5050
end
5151

5252
# Handle `mvn pmd:check` results
5353
pmd_report = 'target/pmd.xml'
5454
unless File.file?(pmd_report)
55-
warn("Couldn't find #{pmd_report}. PMD result is unknown")
55+
warn("Couldn't find #{pmd_report}. maven-pmd-plugin result is unknown")
5656
else
5757
errors_count = 0
5858
doc = Nokogiri::XML(File.open(pmd_report))
@@ -67,15 +67,15 @@ else
6767
msg = node.text.lstrip.sub(/\.$/, '')
6868
file = node.parent['name'].sub(pwd, '')
6969
file = github.html_link("#{file}#{line}")
70-
fail("PMD error in #{file}: #{msg}")
70+
fail("maven-pmd-plugin error in #{file}: #{msg}")
7171
end
72-
print_errors_summary 'PMD', errors_count, 'https://github.com/php-coder/mystamps/wiki/pmd-cpd'
72+
print_errors_summary 'maven-pmd-plugin', errors_count, 'https://github.com/php-coder/mystamps/wiki/pmd-cpd'
7373
end
7474

7575
# Handle `mvn codenarc:codenarc` results
7676
codenarc_report = 'target/CodeNarc.xml'
7777
unless File.file?(codenarc_report)
78-
warn("Couldn't find #{codenarc_report}. CodeNarc result is unknown")
78+
warn("Couldn't find #{codenarc_report}. codenarc-maven-plugin result is unknown")
7979
else
8080
errors_count = 0
8181
doc = Nokogiri::XML(File.open(codenarc_report))
@@ -87,15 +87,15 @@ else
8787
msg = node.xpath('./Message').first.text
8888
file = node.parent['name']
8989
file = github.html_link("#{root_dir}/#{path}/#{file}#L#{line}")
90-
fail("CodeNarc error in #{file}: #{msg}")
90+
fail("codenarc-maven-plugin error in #{file}: #{msg}")
9191
end
92-
print_errors_summary 'CodeNarc', errors_count, 'https://github.com/php-coder/mystamps/wiki/codenarc'
92+
print_errors_summary 'codenarc-maven-plugin', errors_count, 'https://github.com/php-coder/mystamps/wiki/codenarc'
9393
end
9494

9595
# Handle `mvn license:check` output
9696
license_output = 'license.log'
9797
unless File.file?(license_output)
98-
warn("Couldn't find #{license_output}. Result of checking licenses is unknown")
98+
warn("Couldn't find #{license_output}. license-maven-plugin result is unknown")
9999
else
100100
errors = []
101101
File.readlines(license_output)
@@ -118,12 +118,12 @@ else
118118
errors_cnt = errors.size()
119119
error_msgs = errors.join("</li>\n<li>")
120120
if errors_cnt == 1
121-
fail("license plugin reports about #{errors_cnt} error:\n"\
121+
fail("license-maven-plugin reports about #{errors_cnt} error:\n"\
122122
"<ul><li>#{error_msgs}</li></ul>\n"\
123123
"Please, fix it by executing `mvn license:format`\n"\
124124
"See also: <a href=\"#{link}\">#{link}</a>")
125125
elsif errors_cnt > 1
126-
fail("license plugin reports about #{errors_cnt} errors:\n"\
126+
fail("license-maven-plugin reports about #{errors_cnt} errors:\n"\
127127
"<ul><li>#{error_msgs}</li></ul>\n"\
128128
"Please, fix them by executing `mvn license:format`\n"\
129129
"See also: <a href=\"#{link}\">#{link}</a>")
@@ -134,7 +134,7 @@ end
134134
# Handle `mvn sortpom:verify` output
135135
sortpom_output = 'pom.log'
136136
unless File.file?(sortpom_output)
137-
warn("Couldn't find #{sortpom_output}. Result of checking pom.xml is unknown")
137+
warn("Couldn't find #{sortpom_output}. sortpom-maven-plugin result is unknown")
138138
else
139139
errors = []
140140
File.readlines(sortpom_output).each do |line|
@@ -157,12 +157,12 @@ else
157157
errors_cnt = errors.size()
158158
error_msgs = errors.join("</li>\n<li>")
159159
if errors_cnt == 1
160-
fail("sortpom plugin reports about #{errors_cnt} error:\n"\
160+
fail("sortpom-maven-plugin reports about #{errors_cnt} error:\n"\
161161
"<ul><li>#{error_msgs}</li></ul>\n"\
162162
"Please, fix it by executing `mvn sortpom:sort`\n"\
163163
"See also: <a href=\"#{link}\">#{link}</a>")
164164
elsif errors_cnt > 1
165-
fail("sortpom plugin reports about #{errors_cnt} errors:\n"\
165+
fail("sortpom-maven-plugin reports about #{errors_cnt} errors:\n"\
166166
"<ul><li>#{error_msgs}</li></ul>\n"\
167167
"Please, fix them by executing `mvn sortpom:sort`\n"\
168168
"See also: <a href=\"#{link}\">#{link}</a>")
@@ -197,7 +197,7 @@ end
197197
# Handle `mvn findbugs:check` results
198198
findbugs_report = 'target/findbugsXml.xml'
199199
unless File.file?(findbugs_report)
200-
warn("Couldn't find #{findbugs_report}. FindBugs result is unknown")
200+
warn("Couldn't find #{findbugs_report}. findbugs-maven-plugin result is unknown")
201201
else
202202
errors_count = 0
203203
doc = Nokogiri::XML(File.open(findbugs_report))
@@ -216,7 +216,7 @@ else
216216
src_dir = src_dirs.find { |dir| File.file?("#{dir}/#{file}") }
217217
src_dir = src_dir.sub(pwd, '')
218218
file = github.html_link("#{src_dir}/#{file}#{line}")
219-
fail("FindBugs error in #{file}: #{msg}")
219+
fail("findbugs-maven-plugin error in #{file}: #{msg}")
220220
end
221-
print_errors_summary 'FindBugs', errors_count, 'https://github.com/php-coder/mystamps/wiki/findbugs'
221+
print_errors_summary 'findbugs-maven-plugin', errors_count, 'https://github.com/php-coder/mystamps/wiki/findbugs'
222222
end

0 commit comments

Comments
 (0)