File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,35 @@ else
205
205
end
206
206
end
207
207
208
+ # Handle `rflint` output
209
+ #
210
+ # Example:
211
+ # + src/test/robotframework/series/creation/logic.robot
212
+ # E: 35, 0: Too many steps (34) in test case (TooManyTestSteps)
213
+ #
214
+ rflint_output = 'rflint.log'
215
+ unless File . file? ( rflint_output )
216
+ warn ( "Couldn't find #{ rflint_output } . Result of rflint is unknown" )
217
+ else
218
+ errors_count = 0
219
+ current_file = ''
220
+ File . readlines ( rflint_output ) . each do |line |
221
+ if line . start_with? '+ '
222
+ current_file = line . sub ( /^\+ / , '' ) . rstrip
223
+ next
224
+ end
225
+
226
+ errors_count += 1
227
+
228
+ parsed = line . match ( /[A-Z]: (?<line>\d +), [^:]+: (?<msg>.*)/ )
229
+ msg = parsed [ 'msg' ] . sub ( / \( \w +\) $/ , '' )
230
+ lineno = parsed [ 'line' ]
231
+ file = github . html_link ( "#{ current_file } #L#{ lineno } " )
232
+ fail ( "rflint error in #{ file } :\n #{ msg } " )
233
+ end
234
+ print_errors_summary 'rflint' , errors_count , 'https://github.com/php-coder/mystamps/wiki/rflint'
235
+ end
236
+
208
237
# Handle `mvn findbugs:check` results
209
238
#
210
239
# Example:
You can’t perform that action at this time.
0 commit comments