public List<File> getSourceFiles() { return InputFileUtils.toFiles(fileSystem.mainFiles(CheckstyleConstants.JAVA_KEY)); }
public List<File> getSourceFiles() { return InputFileUtils.toFiles(fileSystem.mainFiles(Java.KEY)); }
public boolean shouldExecuteOnProject(Project project) { return !project.getFileSystem().mainFiles(Java.KEY).isEmpty() && !profile.getActiveRulesByRepository(CheckstyleConstants.REPOSITORY_KEY).isEmpty(); }
private List<java.io.File> getFilesToAnalyse(Project project) { List<java.io.File> result = Lists.newArrayList(); for (InputFile file : project.getFileSystem().mainFiles(cSharp.getKey())) { result.add(file.getFile()); } return result; }
@Override public boolean shouldExecuteOnProject(Project project) { boolean hasLangFiles = !fs.mainFiles(language).isEmpty() || !fs.testFiles(language).isEmpty(); if (hasLangFiles) { checkFactory = AnnotationCheckFactory.create(qProfile, DefaultCommonRulesRepository.keyForLanguage(language), CommonRulesConstants.CLASSES); activeChecks = checkFactory.getChecks(); } return !activeChecks.isEmpty(); }
public boolean shouldExecuteOnProject(Project project) { return (!project.getFileSystem().mainFiles(Java.KEY).isEmpty() && !profile.getActiveRulesByRepository(PmdConstants.REPOSITORY_KEY).isEmpty()) || (!project.getFileSystem().testFiles(Java.KEY).isEmpty() && !profile.getActiveRulesByRepository(PmdConstants.TEST_REPOSITORY_KEY).isEmpty()); }
@Override public boolean shouldExecuteOnProject(Project project) { return project.getAnalysisType().isDynamic(true) && (!project.getFileSystem().mainFiles("java").isEmpty() || !project.getFileSystem().testFiles("java").isEmpty()); }
protected void analyse(ProjectFileSystem fileSystem, SensorContext context) { parseDirs(context, InputFileUtils.toFiles(fileSystem.mainFiles(ObjectiveC.KEY)), fileSystem.getSourceDirs(), false, fileSystem.getSourceCharset()); }
public void analyse(Project project, SensorContext context) { this.project = project; this.context = context; Collection<SquidCheck> squidChecks = annotationCheckFactory.getChecks(); this.scanner = ObjectiveCAstScanner.create(createConfiguration(project), squidChecks.toArray(new SquidCheck[squidChecks.size()])); scanner.scanFiles(InputFileUtils.toFiles(project.getFileSystem().mainFiles(ObjectiveC.KEY))); Collection<SourceCode> squidSourceFiles = scanner.getIndex().search(new QueryByType(SourceFile.class)); save(squidSourceFiles); }
private Report executePmd() { Report report = new Report(); RuleContext context = new RuleContext(); context.setReport(report); PmdTemplate pmdFactory = createPmdTemplate(); executeRules(pmdFactory, context, projectFileSystem.mainFiles(Java.KEY), PmdConstants.REPOSITORY_KEY); executeRules(pmdFactory, context, projectFileSystem.testFiles(Java.KEY), PmdConstants.TEST_REPOSITORY_KEY); pmdConfiguration.dumpXmlReport(report); return report; }