File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,28 @@ else
146
146
print_errors_summary 'sortpom plugin' , errors_count , 'https://github.com/php-coder/mystamps/wiki/sortpom'
147
147
end
148
148
149
+ # Handle `rflint` output
150
+ rflint_output = 'rflint.log'
151
+ unless File . file? ( rflint_output )
152
+ warn ( "Couldn't find #{ rflint_output } . Result of rflint is unknown" )
153
+ else
154
+ errors_count = 0
155
+ current_file = ''
156
+ File . readlines ( rflint_output ) . each do |line |
157
+ if line . start_with? '+ '
158
+ current_file = line . sub ( /^\+ / , '' )
159
+ next
160
+ end
161
+
162
+ parsed = line . match ( /[A-Z]: (?<line>\d +), [^:]+: (?<msg>.*)/ )
163
+ msg = parsed [ 'msg' ] . sub ( / \( \w +\) $/ , '' )
164
+ lineno = parsed [ 'line' ]
165
+ file = github . html_link ( "#{ current_file } #{ lineno } " )
166
+ fail ( "rflint error in #{ file } : #{ msg } " )
167
+ end
168
+ print_errors_summary 'rflint' , errors_count , 'https://github.com/php-coder/mystamps/wiki/rflint'
169
+ end
170
+
149
171
# Handle `mvn findbugs:check` results
150
172
findbugs_report = 'target/findbugsXml.xml'
151
173
unless File . file? ( findbugs_report )
You can’t perform that action at this time.
0 commit comments