minor: fix for indelij idea 2016.2 violations and redundant suppression (#3352)

This commit is contained in:
Roman Ivanov 2016-07-16 22:34:40 -07:00 committed by GitHub
parent 137c0b2d4a
commit 4674e599d9
5 changed files with 4 additions and 5 deletions

View File

@ -39,7 +39,7 @@ public class OuterTypeFilenameCheck extends AbstractCheck {
public static final String MSG_KEY = "type.file.mismatch";
/** Pattern matching any file extension with dot included. */
private static final Pattern FILE_EXTENSION_PATTERN = Pattern.compile("\\.[^\\.]*$");
private static final Pattern FILE_EXTENSION_PATTERN = Pattern.compile("\\.[^.]*$");
/** Indicates whether the first token has been seen in the file. */
private boolean seenFirstToken;

View File

@ -109,7 +109,7 @@ public class TrailingCommentCheck extends AbstractCheck {
private Pattern legalComment;
/** The format string of the regexp. */
private String format = "^[\\s\\}\\);]*$";
private String format = "^[\\s\\});]*$";
/** The regexp to match against. */
private Pattern regexp = Pattern.compile(format);

View File

@ -133,7 +133,7 @@ public final class IllegalTypeCheck extends AbstractCheck {
private List<Integer> memberModifiers;
/** The format string of the regexp. */
private String format = "^(.*[\\.])?Abstract.*$";
private String format = "^(.*[.])?Abstract.*$";
/** The regexp to match against. */
private Pattern regexp = Pattern.compile(format);

View File

@ -60,7 +60,6 @@ public final class DetectorOptions {
/**
* Returns new Builder object.
* @return Builder object.
* @noinspection ReturnOfInnerClass
*/
public static Builder newBuilder() {
return new DetectorOptions().new Builder();

View File

@ -87,7 +87,7 @@ public class CommitValidationTest {
private static final Pattern ACCEPTED_COMMIT_MESSAGE_PATTERN =
Pattern.compile(ACCEPTED_COMMIT_MESSAGE_REGEX_PATTERN);
private static final Pattern INVALID_POSTFIX_PATTERN = Pattern.compile("^.*[\\. \\t]$");
private static final Pattern INVALID_POSTFIX_PATTERN = Pattern.compile("^.*[. \\t]$");
private static final int PREVIOUS_COMMITS_TO_CHECK_COUNT = 10;