34
34
# Handle `mvn checkstyle:check` results
35
35
cs_report = 'target/checkstyle-result.xml'
36
36
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" )
38
38
else
39
39
errors_count = 0
40
40
doc = Nokogiri ::XML ( File . open ( cs_report ) )
44
44
msg = node [ 'message' ] . sub ( /\. $/ , '' )
45
45
file = node . parent [ 'name' ] . sub ( pwd , '' )
46
46
file = github . html_link ( "#{ file } #L#{ line } " )
47
- fail ( "CheckStyle error in #{ file } : #{ msg } " )
47
+ fail ( "maven-checkstyle-plugin error in #{ file } : #{ msg } " )
48
48
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'
50
50
end
51
51
52
52
# Handle `mvn pmd:check` results
53
53
pmd_report = 'target/pmd.xml'
54
54
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" )
56
56
else
57
57
errors_count = 0
58
58
doc = Nokogiri ::XML ( File . open ( pmd_report ) )
67
67
msg = node . text . lstrip . sub ( /\. $/ , '' )
68
68
file = node . parent [ 'name' ] . sub ( pwd , '' )
69
69
file = github . html_link ( "#{ file } #{ line } " )
70
- fail ( "PMD error in #{ file } : #{ msg } " )
70
+ fail ( "maven-pmd-plugin error in #{ file } : #{ msg } " )
71
71
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'
73
73
end
74
74
75
75
# Handle `mvn codenarc:codenarc` results
76
76
codenarc_report = 'target/CodeNarc.xml'
77
77
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" )
79
79
else
80
80
errors_count = 0
81
81
doc = Nokogiri ::XML ( File . open ( codenarc_report ) )
87
87
msg = node . xpath ( './Message' ) . first . text
88
88
file = node . parent [ 'name' ]
89
89
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 } " )
91
91
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'
93
93
end
94
94
95
95
# Handle `mvn license:check` output
96
96
license_output = 'license.log'
97
97
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" )
99
99
else
100
100
errors = [ ]
101
101
File . readlines ( license_output )
@@ -118,12 +118,12 @@ else
118
118
errors_cnt = errors . size ( )
119
119
error_msgs = errors . join ( "</li>\n <li>" )
120
120
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 " \
122
122
"<ul><li>#{ error_msgs } </li></ul>\n " \
123
123
"Please, fix it by executing `mvn license:format`\n " \
124
124
"See also: <a href=\" #{ link } \" >#{ link } </a>" )
125
125
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 " \
127
127
"<ul><li>#{ error_msgs } </li></ul>\n " \
128
128
"Please, fix them by executing `mvn license:format`\n " \
129
129
"See also: <a href=\" #{ link } \" >#{ link } </a>" )
134
134
# Handle `mvn sortpom:verify` output
135
135
sortpom_output = 'pom.log'
136
136
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" )
138
138
else
139
139
errors = [ ]
140
140
File . readlines ( sortpom_output ) . each do |line |
@@ -157,12 +157,12 @@ else
157
157
errors_cnt = errors . size ( )
158
158
error_msgs = errors . join ( "</li>\n <li>" )
159
159
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 " \
161
161
"<ul><li>#{ error_msgs } </li></ul>\n " \
162
162
"Please, fix it by executing `mvn sortpom:sort`\n " \
163
163
"See also: <a href=\" #{ link } \" >#{ link } </a>" )
164
164
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 " \
166
166
"<ul><li>#{ error_msgs } </li></ul>\n " \
167
167
"Please, fix them by executing `mvn sortpom:sort`\n " \
168
168
"See also: <a href=\" #{ link } \" >#{ link } </a>" )
197
197
# Handle `mvn findbugs:check` results
198
198
findbugs_report = 'target/findbugsXml.xml'
199
199
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" )
201
201
else
202
202
errors_count = 0
203
203
doc = Nokogiri ::XML ( File . open ( findbugs_report ) )
216
216
src_dir = src_dirs . find { |dir | File . file? ( "#{ dir } /#{ file } " ) }
217
217
src_dir = src_dir . sub ( pwd , '' )
218
218
file = github . html_link ( "#{ src_dir } /#{ file } #{ line } " )
219
- fail ( "FindBugs error in #{ file } : #{ msg } " )
219
+ fail ( "findbugs-maven-plugin error in #{ file } : #{ msg } " )
220
220
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'
222
222
end
0 commit comments