File tree Expand file tree Collapse file tree
core/src/test/java/com/google/errorprone/bugpatterns Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -253,6 +253,44 @@ public class UnusedWithComment {}
253253 .doTest ();
254254 }
255255
256+ @ Test
257+ public void removal_markdownJavadocs () {
258+ refactoringHelper
259+ .addInputLines (
260+ "UnusedWithComment.java" ,
261+ """
262+ package unusedvars;
263+
264+ public class UnusedWithComment {
265+ /// Method comment
266+ private void test1() {}
267+
268+ /// First line of method comment
269+ /// Second line of method comment
270+ private void test2() {}
271+
272+ // Keep this comment
273+
274+ /// First line of method comment
275+ ///
276+ /// Second line of method comment
277+ private void test3() {}
278+ }
279+ """ )
280+ .addOutputLines (
281+ "UnusedWithComment.java" ,
282+ """
283+ package unusedvars;
284+
285+ public class UnusedWithComment {
286+
287+ // Keep this comment
288+
289+ }
290+ """ )
291+ .doTest ();
292+ }
293+
256294 @ Test
257295 public void usedInLambda () {
258296 helper
You can’t perform that action at this time.
0 commit comments