Exemple #1
0
 private Diagnostic convertPuppetLintDiagnostic(File moduleRoot, Issue issue) {
   FileDiagnostic diagnostic =
       new FileDiagnostic(
           getSeverity(issue),
           PuppetLintService.PUPPET_LINT,
           issue.getMessage(),
           new File(getRelativePath(new File(moduleRoot, issue.getPath()))));
   diagnostic.setLineNumber(issue.getLineNumber());
   return diagnostic;
 }
Exemple #2
0
 private static int getSeverity(Issue issue) {
   switch (issue.getSeverity()) {
     case ERROR:
       return Diagnostic.ERROR;
     default:
       return Diagnostic.WARNING;
   }
 }