/** * The filename of a filter specifying which bugs are reported. */ public File getIncludeFilter() { TextResource includeFilterConfig = getIncludeFilterConfig(); if (includeFilterConfig == null) { return null; } return includeFilterConfig.asFile(); }
/** * The filename of a filter specifying bugs to exclude from being reported. */ public File getExcludeFilter() { TextResource excludeFilterConfig = getExcludeFilterConfig(); if (excludeFilterConfig == null) { return null; } return excludeFilterConfig.asFile(); }
/** * The filename of a filter specifying baseline bugs to exclude from being reported. */ public File getExcludeBugsFilter() { TextResource excludeBugsFilterConfig = getExcludeBugsFilterConfig(); if (excludeBugsFilterConfig == null) { return null; } return excludeBugsFilterConfig.asFile(); }
private void configureTaskConventionMapping(Configuration configuration, Checkstyle task) { ConventionMapping taskMapping = task.getConventionMapping(); taskMapping.map("checkstyleClasspath", Callables.returning(configuration)); taskMapping.map("config", new Callable<TextResource>() { @Override public TextResource call() { return extension.getConfig(); } }); taskMapping.map("configProperties", new Callable<Map<String, Object>>() { @Override public Map<String, Object> call() { return extension.getConfigProperties(); } }); taskMapping.map("ignoreFailures", new Callable<Boolean>() { @Override public Boolean call() { return extension.isIgnoreFailures(); } }); taskMapping.map("showViolations", new Callable<Boolean>() { @Override public Boolean call() { return extension.isShowViolations(); } }); }
/** * A filter specifying which bugs are reported. Replaces the {@code includeFilter} property. * * @since 2.2 */ @Incubating @Nested @Optional public TextResource getIncludeFilterConfig() { return includeFilterConfig; }
/** * A filter specifying bugs to exclude from being reported. Replaces the {@code excludeFilter} property. * * @since 2.2 */ @Incubating @Nested @Optional public TextResource getExcludeFilterConfig() { return excludeFilterConfig; }
/** * A filter specifying baseline bugs to exclude from being reported. */ @Incubating @Nested @Optional public TextResource getExcludeBugsFilterConfig() { return excludeBugsFilterConfig; }
private void configureTaskConventionMapping(Configuration configuration, CodeNarc task) { ConventionMapping taskMapping = task.getConventionMapping(); taskMapping.map("codenarcClasspath", Callables.returning(configuration)); taskMapping.map("config", new Callable<TextResource>() { @Override public TextResource call() { return extension.getConfig(); } }); taskMapping.map("maxPriority1Violations", new Callable<Integer>() { @Override public Integer call() { return extension.getMaxPriority1Violations(); } }); taskMapping.map("maxPriority2Violations", new Callable<Integer>() { @Override public Integer call() { return extension.getMaxPriority2Violations(); } }); taskMapping.map("maxPriority3Violations", new Callable<Integer>() { @Override public Integer call() { return extension.getMaxPriority3Violations(); } }); taskMapping.map("ignoreFailures", new Callable<Boolean>() { @Override public Boolean call() { return extension.isIgnoreFailures(); } }); }
@Nullable @Internal private String getPathToOverview() { TextResource overview = getOverviewText(); if (overview!=null) { return overview.asFile().getAbsolutePath(); } return null; }
protected static TextResource utf8ClassPathResource(final Class<?> clazz, final String filename) { return new CharSourceBackedTextResource("Classpath resource '" + filename + "'", new CharSource() { @Override public Reader openStream() throws IOException { InputStream stream = clazz.getResourceAsStream(filename); if (stream == null) { throw new IllegalStateException("Could not find class path resource " + filename + " relative to " + clazz.getName()); } return new BufferedReader(new InputStreamReader(stream, Charsets.UTF_8)); } }); }
@Override public TextResource getStylesheet() { return stylesheet; }
@Override public void setStylesheet(TextResource stylesheet) { this.stylesheet = stylesheet; }
public void setConfig(TextResource config) { this.config = config; }
private void configureTaskConventionMapping(Configuration configuration, Pmd task) { ConventionMapping taskMapping = task.getConventionMapping(); taskMapping.map("pmdClasspath", Callables.returning(configuration)); taskMapping.map("ruleSets", new Callable<List<String>>() { @Override public List<String> call() { return extension.getRuleSets(); } }); taskMapping.map("ruleSetConfig", new Callable<TextResource>() { @Override public TextResource call() { return extension.getRuleSetConfig(); } }); taskMapping.map("ruleSetFiles", new Callable<FileCollection>() { @Override public FileCollection call() { return extension.getRuleSetFiles(); } }); taskMapping.map("ignoreFailures", new Callable<Boolean>() { @Override public Boolean call() { return extension.isIgnoreFailures(); } }); taskMapping.map("rulePriority", new Callable<Integer>() { @Override public Integer call() { return extension.getRulePriority(); } }); taskMapping.map("consoleOutput", new Callable<Boolean>() { @Override public Boolean call() { return extension.isConsoleOutput(); } }); taskMapping.map("targetJdk", new Callable<TargetJdk>() { @Override public TargetJdk call() { return extension.getTargetJdk(); } }); }
public void setRuleSetConfig(TextResource ruleSetConfig) { this.ruleSetConfig = ruleSetConfig; }
private void configureTaskConventionMapping(Configuration configuration, FindBugs task) { ConventionMapping taskMapping = task.getConventionMapping(); taskMapping.map("findbugsClasspath", Callables.returning(configuration)); taskMapping.map("ignoreFailures", new Callable<Boolean>() { @Override public Boolean call() { return extension.isIgnoreFailures(); } }); taskMapping.map("effort", new Callable<String>() { @Override public String call() { return extension.getEffort(); } }); taskMapping.map("reportLevel", new Callable<String>() { @Override public String call() { return extension.getReportLevel(); } }); taskMapping.map("visitors", new Callable<Collection<String>>() { @Override public Collection<String> call() { return extension.getVisitors(); } }); taskMapping.map("omitVisitors", new Callable<Collection<String>>() { @Override public Collection<String> call() { return extension.getOmitVisitors(); } }); taskMapping.map("excludeFilterConfig", new Callable<TextResource>() { @Override public TextResource call() { return extension.getExcludeFilterConfig(); } }); taskMapping.map("includeFilterConfig", new Callable<TextResource>() { @Override public TextResource call() { return extension.getIncludeFilterConfig(); } }); taskMapping.map("excludeBugsFilterConfig", new Callable<TextResource>() { @Override public TextResource call() { return extension.getExcludeBugsFilterConfig(); } }); taskMapping.map("extraArgs", new Callable<Collection<String>>() { @Override public Collection<String> call() { return extension.getExtraArgs(); } }); }
@Incubating public void setIncludeFilterConfig(TextResource includeFilterConfig) { this.includeFilterConfig = includeFilterConfig; }
@Incubating public void setExcludeFilterConfig(TextResource excludeFilterConfig) { this.excludeFilterConfig = excludeFilterConfig; }
@Incubating public void setExcludeBugsFilterConfig(TextResource excludeBugsFilterConfig) { this.excludeBugsFilterConfig = excludeBugsFilterConfig; }
/** * The filename of a filter specifying which bugs are reported. */ @Internal public File getIncludeFilter() { TextResource config = getIncludeFilterConfig(); return config == null ? null : config.asFile(); }
/** * The filename of a filter specifying bugs to exclude from being reported. */ @Internal public File getExcludeFilter() { TextResource config = getExcludeFilterConfig(); return config == null ? null : config.asFile(); }
/** * The filename of a filter specifying baseline bugs to exclude from being reported. */ @Internal public File getExcludeBugsFilter() { TextResource config = getExcludeBugsFilterConfig(); return config == null ? null : config.asFile(); }
public void setIncludeFilterConfig(TextResource includeFilterConfig) { this.includeFilterConfig = includeFilterConfig; }
public void setExcludeFilterConfig(TextResource excludeFilterConfig) { this.excludeFilterConfig = excludeFilterConfig; }
public void setExcludeBugsFilterConfig(TextResource excludeBugsFilterConfig) { this.excludeBugsFilterConfig = excludeBugsFilterConfig; }
/** * The CodeNarc configuration to use. Replaces the {@code configFile} property. * * @since 2.2 */ @Incubating @Nested public TextResource getConfig() { return config; }
/** * The Checkstyle configuration to use. Replaces the {@code configFile} property. * * @since 2.2 */ @Incubating @Nested public TextResource getConfig() { return config; }
@Incubating public void setRuleSetConfig(TextResource ruleSetConfig) { this.ruleSetConfig = ruleSetConfig; }
/** * Returns a HTML text to be used for overview documentation. Set to {@code null} when there is no overview text. */ @Nested @Optional public TextResource getOverviewText() { return overview; }
public TextResource fromString(String string) { return new StringBackedTextResource(tempFileProvider, string); }
public TextResource fromFile(Object file, String charset) { return new FileCollectionBackedTextResource(tempFileProvider, fileOperations.files(file), Charset.forName(charset)); }
public TextResource fromArchiveEntry(Object archive, String entryPath, String charset) { return new FileCollectionBackedArchiveTextResource(fileOperations, tempFileProvider, fileOperations.files(archive), entryPath, Charset.forName(charset)); }
public TextResource fromArchiveEntry(Object archive, String entryPath) { return fromArchiveEntry(archive, entryPath, Charset.defaultCharset().name()); }
public DefaultTemplateBasedStartScriptGenerator(String lineSeparator, Transformer<Map<String, String>, JavaAppStartScriptGenerationDetails> bindingFactory, TextResource template) { this.lineSeparator = lineSeparator; this.bindingFactory = bindingFactory; this.template = template; }
public void setTemplate(TextResource template) { this.template = template; }
public TextResource getTemplate() { return template; }
@Incubating public TextResource getIncludeFilterConfig() { return this.includeFilterConfig; }