Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excavator: Upgrades Baseline to the latest version #246

Merged
merged 1 commit into from
Oct 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .baseline/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@
<module name="AvoidStarImport"/> <!-- Java Style Guide: No wildcard imports -->
<module name="AvoidStaticImport"> <!-- Java Style Guide: No static imports -->
<property name="excludes" value="
com.google.common.base.Preconditions.*,
com.palantir.logsafe.Preconditions.*,
java.util.Collections.*,
java.util.stream.Collectors.*,
com.palantir.logsafe.Preconditions.*,
com.google.common.base.Preconditions.*,
org.apache.commons.lang3.Validate.*"/>
org.apache.commons.lang3.Validate.*,
org.assertj.core.api.Assertions.*,
org.mockito.Mockito.*"/>
</module>
<module name="ClassTypeParameterName"> <!-- Java Style Guide: Type variable names -->
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
Expand Down Expand Up @@ -469,7 +471,7 @@
<module name="NestedTryDepth"/> <!-- Java Coding Guide: Try/catch blocks: never nested -->
<module name="NonEmptyAtclauseDescription"/> <!-- Java Style Guide: At-clauses -->
<module name="ParameterName"> <!-- Java Style Guide: Parameter names -->
<property name="format" value="^[a-z][a-zA-Z0-9]+$"/>
<property name="format" value="^_?[a-z][a-zA-Z0-9]+$"/>
<message key="name.invalidPattern" value="Parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="SingleLineJavadoc"/> <!-- Java Style Guide: General form -->
Expand Down
3 changes: 2 additions & 1 deletion .baseline/spotless/eclipse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
Expand Down Expand Up @@ -177,7 +178,7 @@
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="48"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="80"/>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ buildscript {
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.netflix.nebula:nebula-publishing-plugin:14.0.0'
classpath 'com.palantir.baseline:gradle-baseline-java:2.3.0'
classpath 'com.palantir.baseline:gradle-baseline-java:2.19.0'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.12.4'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
public class CompileConjurePythonTask extends ConjureGeneratorTask {

@Override
protected final Map<String, Supplier<Object>> requiredOptions(File file) {
protected final Map<String, Supplier<Object>> requiredOptions(File _file) {
return ImmutableMap.of(
"packageName",
this::getProjectName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void execute(Task task) {
}

@Override
protected final Map<String, Supplier<Object>> requiredOptions(File file) {
protected final Map<String, Supplier<Object>> requiredOptions(File _file) {
return ImmutableMap.of(
"packageName",
this::getPackageName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public ConjureGeneratorTask() {
// main task. Intentionally not using a lambda because this breaks Gradle caching
doLast(new Action<Task>() {
@Override
public void execute(Task task) {
public void execute(Task _task) {
compileFiles();
}
});
Expand Down Expand Up @@ -83,7 +83,7 @@ public final GeneratorOptions getOptions() {
* Where to put the output for the given input source file.
* This should return a directory that's under {@link #getOutputDirectory()}.
*/
protected File outputDirectoryFor(File file) {
protected File outputDirectoryFor(File _file) {
return getOutputDirectory();
}

Expand Down Expand Up @@ -116,7 +116,7 @@ public void compileFiles() {
* What options are required, along with suppliers for obtaining their default values if they were not defined in
* the {@link #getOptions() options}.
*/
protected Map<String, Supplier<Object>> requiredOptions(File file) {
protected Map<String, Supplier<Object>> requiredOptions(File _file) {
return ImmutableMap.of();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ private static Copy getConjureSources(Project project) {
// (see https://github.com/gradle/gradle/issues/5510)
copyConjureSourcesTask.doFirst(new Action<Task>() {
@Override
public void execute(Task task) {
public void execute(Task _task) {
GFileUtils.deleteDirectory(buildDir);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public ExtractExecutableTask() {

doFirst(new Action<Task>() {
@Override
public void execute(Task task) {
public void execute(Task _task) {
Set<String> rootDirectories = new HashSet<>();
getProject().tarTree(tarFile.get()).visit(new FileVisitor() {
@Override
Expand All @@ -71,7 +71,7 @@ public void visitDir(FileVisitDetails dirDetails) {
}

@Override
public void visitFile(FileVisitDetails fileDetails) {}
public void visitFile(FileVisitDetails _fileDetails) {}
});
if (rootDirectories.size() != 1) {
throw new GradleException(String.format(
Expand All @@ -84,7 +84,7 @@ public void visitFile(FileVisitDetails fileDetails) {}

doLast(new Action<Task>() {
@Override
public void execute(Task task) {
public void execute(Task _task) {
getLogger().info("Extracted into {}", getOutputDirectory());
// Ensure the executable exists
Preconditions.checkState(
Expand Down