Skip to content

Commit

Permalink
Suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie authored and mohamedsamehsalah committed Sep 11, 2024
1 parent 67c2c05 commit 59f7385
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private static String getRuleCollectionName(ClassTree tree) {
String className = tree.getSimpleName().toString();

// XXX: Instead of throwing an error here, it'd be nicer to have a bug checker validate key
// aspects of `RefasterRuleCollectionRefasterTestCase` subtypes.
// aspects of `RefasterRuleCollectionTestCase` subtypes.
return tryExtractPatternGroup(className, TEST_CLASS_NAME_PATTERN)
.orElseThrow(
violation(
Expand All @@ -82,7 +82,7 @@ private static boolean isInputFile(URI sourceFile) {
String path = sourceFile.getPath();

// XXX: Instead of throwing an error here, it'd be nicer to have a bug checker validate key
// aspects of `RefasterRuleCollectionRefasterTestCase` subtypes.
// aspects of `RefasterRuleCollectionTestCase` subtypes.
return "Input"
.equals(
tryExtractPatternGroup(path, TEST_CLASS_FILE_NAME_PATTERN)
Expand Down Expand Up @@ -118,7 +118,7 @@ private static Optional<RefasterTestCase> tryExtractRefasterTestCase(
private static String getFormattedSource(MethodTree method, VisitorState state) {
String source = SourceCode.treeToString(method, state);
int finalNewline = source.lastIndexOf(LINE_SEPARATOR);
if (finalNewline < 0) {
if (finalNewline == -1) {
return source;
}

Expand Down

0 comments on commit 59f7385

Please sign in to comment.