Skip to content

Commit

Permalink
Fix go comments bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ketkarameya committed Feb 23, 2023
1 parent 8f2231f commit 815a0f5
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func simplify_if_statement_false_comment_demo_single_comment() {
fmt.Println("remain")
}
// this comment doesnt get removed but it should
if exp1.BoolValue("false") {
if exp.BoolValue("false") {
fmt.Println("to be removed 2")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public void complex_conditional_contains_stale_flag(boolean tBool) {
}
}

public void check_comment_cleanup(){
System.out.println("Hellow World!");
}

public void other_api_stale_flag() {

System.out.println("Hi world");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ public void complex_conditional_contains_stale_flag(boolean tBool) {
}
}

public void check_comment_cleanup(){
System.out.println("Hellow World!");
// Should be deleted
if (experimentation.isFlagTreated(TestExperimentName.STALE_FLAG)) {
System.out.println("Hello World");
}
}

public void other_api_stale_flag() {

if (experimentation.isFlagTreated(TestExperimentName.STALE_FLAG)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,8 @@ internal class XPFlagCleanerPositiveCases {
println("Hi world")
}
}

fun check_comments(a: Int, z: Int) {
println("Hello World!")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,12 @@ internal class XPFlagCleanerPositiveCases {
println("Hi world")
}
}

fun check_comments(a: Int, z: Int) {
println("Hello World!")
// Should be deleted!
if (!experimentation.isStaleFeature().cachedValue) {
println("Hello World")
}
}
}

0 comments on commit 815a0f5

Please sign in to comment.