Skip to content

Commit

Permalink
Renamed EmptySynchronized to EmptySynchronizedBlock and
Browse files Browse the repository at this point in the history
  • Loading branch information
t1b00 committed Aug 26, 2024
1 parent 8168b87 commit d688a50
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
22 changes: 0 additions & 22 deletions input/src/main/scala/fix/EmptySynchronized.scala

This file was deleted.

22 changes: 22 additions & 0 deletions input/src/main/scala/fix/EmptySynchronizedBlock.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
rule = EmptySynchronizedBlock
*/
package fix

object EmptySynchronizedBlock {
synchronized { // scalafix: ok;
println("sammy")
}
val a = { // scalafix: ok;
println("sammy")
}
synchronized { // assert: EmptySynchronizedBlock
}
val b = { // scalafix: ok;
}

synchronized(()) // assert: EmptySynchronizedBlock

synchronized { () } // assert: EmptySynchronizedBlock

}
2 changes: 1 addition & 1 deletion rules/src/main/scala/fix/ComparingFloatingTypes.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
rule = CatchNpe
rule = ComparingFloatingTypes
*/
package fix

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
rule = EmptySynchronized
rule = EmptySynchronizedBlock
*/
package fix

Expand All @@ -8,7 +8,7 @@ import scalafix.v1._

import scala.meta._

class EmptySynchronized extends SemanticRule("EmptySynchronized") {
class EmptySynchronizedBlock extends SemanticRule("EmptySynchronizedBlock") {

private def diag(pos: Position) = Diagnostic(
"",
Expand Down

0 comments on commit d688a50

Please sign in to comment.