kunwp1 commented on code in PR #9599:
URL: https://github.com/apache/texera/pull/9599#discussion_r4659680782


##########
workflow-compiling-service/src/test/scala/org/apache/texera/amber/translator/verify/ConfigGenerator.scala:
##########
@@ -1082,8 +1082,8 @@ object ConfigGenerator {
   private def enumVariants(
       opClass: Class[_ <: LogicalOp],
       baseNode: ObjectNode,
-      pinned: Set[String] = Set.empty,
-      fill: FillContext = FillContext()
+      pinned: Set[String],
+      fill: FillContext

Review Comment:
   With `fill` now always passed, `FillContext`'s own field defaults (`schemas 
= Map.empty`, `used = mutable.Set.empty`, `rowCount = DefaultRowCount`, around 
line 2133) are dead too. Its only two constructor calls (lines 235 and 447) 
pass all three. Separately, the scaladoc on `FillContext` ("The fields an 
object's conditional `allOf` requires of `row`…") is a copy of the one a few 
lines below, on the function it actually describes. Both can go in this pass.



##########
workflow-compiling-service/src/test/scala/org/apache/texera/amber/translator/verify/ConfigGenerator.scala:
##########
@@ -2079,11 +2079,6 @@ object ConfigGenerator {
       permitted.elements().asScala.exists(_.asText == 
siblings.path(clause.getKey).asText)
     }
 
-  /** The empty object, for a caller with no sibling context: only the 
unconditional
-    * part of a rule can bind.
-    */
-  private def noSiblings: JsonNode = objectMapper.getNodeFactory.objectNode()

Review Comment:
   `.scalafix.conf` already enables `RemoveUnused.privates`, but scalafix only 
acts on compiler unused warnings. Every module (here 
`workflow-compiling-service/build.sbt:79-83`) passes only 
`-Ywarn-unused:imports`, and only under `Compile`, so test code like this gets 
no unused diagnostics. That's why this dead private `noSiblings` (and #9597's 
unread `val ex`s) wasn't caught. Adding `-Wunused:privates,locals` to both 
`Compile` and `Test` would let CI's existing `scalafixAll --check` catch these 
going forward. Spec mixins have no lint either way, so those stay a hand sweep.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to