Skip to content

Commit

Permalink
Fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
jbduncan committed Jul 22, 2017
1 parent e06b62f commit ceb3d4d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
15 changes: 11 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,16 @@ subprojects { subproj ->
'-XepAllDisabledChecksAsWarnings',

// generates too many false positives on constructors that call other constructors.
// TODO: Once #939 is resolved, see if constructors can be refactored more easily
// TODO: once #939 is resolved, see if constructors can be refactored more easily
// to not call each other.
'-Xep:ConstructorLeaksThis:OFF',

// we target Java 8
// TODO: investigate if this check is worth turning on for production files,
// and if so, find places where com.google.errorprone.annotations.@Immutable could
// be applied
'-Xep:Immutable:OFF',

// we target Java 8, not Android
'-Xep:StaticOrDefaultInterfaceMethod:OFF',

// we declare redundant `throws <general-exception>, <more-specific-exception>` for
Expand All @@ -445,18 +450,20 @@ subprojects { subproj ->
options.compilerArgs += [
'-XepAllDisabledChecksAsWarnings',

// these checks are often violated on purpose for testing reasons
'-Xep:ClassCanBeStatic:OFF',
'-Xep:ConstantField:OFF',
'-Xep:ConstructorInvokesOverridable:OFF',
'-Xep:ConstructorLeaksThis:OFF',

// TODO: investigate if its worth turning this check on for tests
'-Xep:Immutable:OFF',

'-Xep:MethodCanBeStatic:OFF',
'-Xep:PrivateConstructorForUtilityClass:OFF',
'-Xep:StaticOrDefaultInterfaceMethod:OFF',
'-Xep:ThrowsUncheckedException:OFF',
'-Xep:UngroupedOverloads:OFF',

// produces lots of warnings, none critical but potentially useful
// TODO: investigate if its worth turning this check on for tests
'-Xep:Var:OFF'
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import com.google.errorprone.annotations.Var;

import org.junit.platform.commons.meta.API;
import org.junit.platform.commons.util.StringUtils;
import org.junit.platform.console.options.Theme;
import org.junit.platform.engine.TestExecutionResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import java.io.Serializable;
import java.util.Objects;

import com.google.errorprone.annotations.Var;

import org.junit.platform.commons.meta.API;
import org.junit.platform.commons.util.PreconditionViolationException;
import org.junit.platform.commons.util.Preconditions;
Expand Down Expand Up @@ -60,7 +62,7 @@ public final class TestTag implements Serializable {
* @see StringUtils#doesNotContainIsoControlCharacter(String)
* @see TestTag#create(String)
*/
public static boolean isValid(String name) {
public static boolean isValid(@Var String name) {
if (name == null) {
return false;
}
Expand Down

0 comments on commit ceb3d4d

Please sign in to comment.