From 152329b3535d284e8c3498f856d76feeafa6ef00 Mon Sep 17 00:00:00 2001 From: Thibault Czarniak Date: Mon, 26 Aug 2024 15:18:28 +0200 Subject: [PATCH] Scalafmt --- input/src/main/scala/fix/NullParameter.scala | 3 +-- rules/src/main/scala/fix/NullParameter.scala | 6 +++--- rules/src/main/scala/fix/Util.scala | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/input/src/main/scala/fix/NullParameter.scala b/input/src/main/scala/fix/NullParameter.scala index 43a9590..b312971 100644 --- a/input/src/main/scala/fix/NullParameter.scala +++ b/input/src/main/scala/fix/NullParameter.scala @@ -17,9 +17,8 @@ object NullParameter { def normal(a: String) = {} normal("test") // scalafix: ok; - abstract class Super(val name: String) case class Boo(override val name: String) extends Super(name) // scalafix: ok; - class Birds(names:String*) // scalafix: ok; + class Birds(names: String*) // scalafix: ok; } diff --git a/rules/src/main/scala/fix/NullParameter.scala b/rules/src/main/scala/fix/NullParameter.scala index 3174414..ac93575 100644 --- a/rules/src/main/scala/fix/NullParameter.scala +++ b/rules/src/main/scala/fix/NullParameter.scala @@ -21,9 +21,9 @@ class NullParameter extends SemanticRule("NullParameter") { override def fix(implicit doc: SemanticDocument): Patch = { doc.tree.collect { case Term.ArgClause(values, _) => values.collect { - case Lit.Null() => Patch.lint(diag(values.head.pos)) - case _ => Patch.empty - } + case Lit.Null() => Patch.lint(diag(values.head.pos)) + case _ => Patch.empty + } }.flatten.asPatch } } diff --git a/rules/src/main/scala/fix/Util.scala b/rules/src/main/scala/fix/Util.scala index 0aecff5..34f1fa8 100644 --- a/rules/src/main/scala/fix/Util.scala +++ b/rules/src/main/scala/fix/Util.scala @@ -21,9 +21,9 @@ object Util { def getType(term: Stat)(implicit doc: SemanticDocument): Symbol = { term.symbol.info match { case Some(symInfo) => symInfo.signature match { - case ValueSignature(TypeRef(_, symbol, _)) => symbol + case ValueSignature(TypeRef(_, symbol, _)) => symbol case MethodSignature(_, _, TypeRef(_, symbol, _)) => symbol - case _ => Symbol.None + case _ => Symbol.None } case _ => Symbol.None }