@Test public void workflowscript_missing_required_againt_at_line_1_comma_column1__is_recognized_as_error() { String line = "WorkflowScript: 1: Missing required section \"agent\" @ line 1, column 1."; JenkinsLinterError error = builderToTest.build(line); assertNotNull(error); assertEquals(1,error.getLine()); assertEquals(1,error.getColumn()); assertEquals(line,error.getMessage()); }
public JenkinsLinterError build(String line) { if (line==null){ return null; } Matcher matcher = ERROR_PATTERN.matcher(line); if (! matcher.find()){ return null; } JenkinsLinterError error = new JenkinsLinterError(); error.message=line; error.line = Integer.valueOf(matcher.group(1)); error.column = Integer.valueOf(matcher.group(2)); return error; }
JenkinsLinterErrorBuilder { public JenkinsLinterError build(String line) { if (line==null){ return null; } Matcher matcher = ERROR_PATTERN.matcher(line); if (! matcher.find()){ return null; } JenkinsLinterError error = new JenkinsLinterError(); error.message=line; error.line = Integer.valueOf(matcher.group(1)); error.column = Integer.valueOf(matcher.group(2)); return error; } }
JenkinsLinterErrorBuilder { public JenkinsLinterError build(String line) { if (line==null){ return null; } Matcher matcher = ERROR_PATTERN.matcher(line); if (! matcher.find()){ return null; } JenkinsLinterError error = new JenkinsLinterError(); error.message=line; error.line = Integer.valueOf(matcher.group(1)); error.column = Integer.valueOf(matcher.group(2)); return error; }  }
JenkinsLinterErrorBuilder { public JenkinsLinterError build(String line) { if (line==null){ return null; } Matcher matcher = ERROR_PATTERN.matcher(line); if (! matcher.find()){ return null; } JenkinsLinterError error = new JenkinsLinterError(); error.message=line; error.line = Integer.valueOf(matcher.group(1)); error.column = Integer.valueOf(matcher.group(2)); return error; }  JenkinsLinterError build(String line); }
JenkinsLinterErrorBuilder { public JenkinsLinterError build(String line) { if (line==null){ return null; } Matcher matcher = ERROR_PATTERN.matcher(line); if (! matcher.find()){ return null; } JenkinsLinterError error = new JenkinsLinterError(); error.message=line; error.line = Integer.valueOf(matcher.group(1)); error.column = Integer.valueOf(matcher.group(2)); return error; }  JenkinsLinterError build(String line);  }