Beispiel #1
0
  public void analyse(Project project, SensorContext context) {
    if (project.getReuseExistingRulesConfig()) {
      Logs.INFO.warn("Reusing existing PMD configuration is not supported any more.");
    }
    try {
      File xmlReport = executor.execute();
      getStaxParser(project, context).parse(xmlReport);

    } catch (Exception e) {
      // TOFIX
      throw new XmlParserException(e);
    }
  }
Beispiel #2
0
 public boolean shouldExecuteOnProject(Project project) {
   return project.getFileSystem().hasJavaSourceFiles()
       && (!profile.getActiveRulesByRepository(PmdConstants.REPOSITORY_KEY).isEmpty()
           || project.getReuseExistingRulesConfig());
 }