andygrove opened a new pull request, #4581:
URL: https://github.com/apache/datafusion-comet/pull/4581

   ## Which issue does this PR close?
   
   <!-- No dedicated issue; small CI enhancement motivated by the lint failure 
on #4579. -->
   
   N/A
   
   ## Rationale for this change
   
   `.scalafix.conf` mixes two kinds of rules: semantic rules 
(`ExplicitResultTypes`, `NoAutoTupling`, `RemoveUnused`) that require a full 
compile, and syntactic rules (`DisableSyntax`, `LeakingImplicitClassVal`, 
`NoValInForComprehension`, `ProcedureSyntax`, `RedundantSyntax`) that only 
parse source.
   
   The `lint-java` job runs the whole set behind `./mvnw package -Psemanticdb` 
as a 4-way Spark matrix, so a trivial syntactic issue (for example the 
redundant `s` string interpolator that broke #4579) only surfaces after roughly 
3.5 minutes of building, repeated across four matrix legs.
   
   The syntactic rules need no compilation and are independent of the 
Spark/Scala profile, so they can be checked once, in seconds.
   
   A second benefit: `lint-java` deliberately skips Spark 4.1 / 4.2 
(semanticdb-scalac for those Scala patch versions is not published, so it 
cannot run `-Psemanticdb`). The new check scans every Scala source, so it is 
the only gate covering the `spark-4.1` / `spark-4.2` trees. It immediately 
surfaced one pre-existing `RedundantSyntax` violation in 
`CometDecimalArithmeticViewSuite` (a `spark-4.1` test), which is fixed here.
   
   ## What changes are included in this PR?
   
   - New `.scalafix-syntactic.conf` containing the syntactic-only rule subset. 
`.scalafix.conf` is unchanged and still enforces the full set in `lint-java`.
   - New `scalafix-syntactic` job in `pr_build_linux.yml` that runs the 
scalafix CLI (`--check --syntactic`) via coursier with no compile, no Maven, 
and no Spark matrix. It runs as a peer of the existing fast `lint` job and does 
not gate or reorder the semantic matrix.
   - Fix the one pre-existing redundant `s` interpolator in 
`CometDecimalArithmeticViewSuite` so the new job passes on a clean tree.
   
   ## How are these changes tested?
   
   Validated locally with the scalafix CLI against the full `spark/` source 
tree:
   
   - Positive: with the fix applied, `scalafix --check --syntactic --config 
.scalafix-syntactic.conf --exclude '**/target/**' spark` exits 0.
   - Negative: reintroducing the redundant `s` interpolator makes the same 
command fail (exit 32, one violation reported), confirming the gate catches the 
#4579 class of issue.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to