示例#1
0
文件: PmdSensor.java 项目: jerr/sonar
  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);
    }
  }
示例#2
0
文件: PmdSensor.java 项目: jerr/sonar
 public boolean shouldExecuteOnProject(Project project) {
   return project.getFileSystem().hasJavaSourceFiles()
       && (!profile.getActiveRulesByRepository(PmdConstants.REPOSITORY_KEY).isEmpty()
           || project.getReuseExistingRulesConfig());
 }