Skip to content

Commit

Permalink
Document possible follow-up work
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan202 committed Dec 23, 2024
1 parent 758bf21 commit 5fc04fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ private void reportMethodRenameBlocker(MethodTree tree, String reason, VisitorSt
.build());
}

// XXX: Consider dropping leading underscores that otherwise result when canonicalizing
// `test_some_method_name`.
private static Optional<String> tryCanonicalizeMethodName(MethodSymbol symbol) {
return Optional.of(symbol.getQualifiedName().toString())
.filter(name -> name.startsWith(TEST_PREFIX))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
*/
// XXX: What about `v1 + "sep" + v2` and similar expressions? Do we want to rewrite those to
// `String.join`, or should some `String.join` invocations be rewritten to use the `+` operator?
// (The latter suggestion would conflict with the `FormatStringConcatenation` check.)
// (The latter suggestion would conflict with the `FormatStringConcatenation` check, but does make
// more sense when `"sep"` is a long string. Similarly for `String.format("%s some long text %s",
// arg1, arg2)`.)
@AutoService(BugChecker.class)
@BugPattern(
summary = "Prefer `String#join` over `String#format`",
Expand Down

0 comments on commit 5fc04fb

Please sign in to comment.