You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by ag...@apache.org on 2026/06/03 18:33:46 UTC
(datafusion-comet) branch main updated: ci: add fast syntactic-only scalafix gate (#4581)
This is an automated email from the ASF dual-hosted git repository.
andygrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
The following commit(s) were added to refs/heads/main by this push:
new c5dd4a2512 ci: add fast syntactic-only scalafix gate (#4581)
c5dd4a2512 is described below
commit c5dd4a251298a8ff85229a498242cc79e48ae798
Author: Andy Grove <ag...@apache.org>
AuthorDate: Wed Jun 3 12:33:41 2026 -0600
ci: add fast syntactic-only scalafix gate (#4581)
---
.github/workflows/pr_build_linux.yml | 26 ++++++++++++++++++++
.scalafix-syntactic.conf | 28 ++++++++++++++++++++++
.../comet/CometDecimalArithmeticViewSuite.scala | 2 +-
3 files changed, 55 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/pr_build_linux.yml b/.github/workflows/pr_build_linux.yml
index 422232f546..68025fd7ba 100644
--- a/.github/workflows/pr_build_linux.yml
+++ b/.github/workflows/pr_build_linux.yml
@@ -46,6 +46,32 @@ jobs:
rustup component add rustfmt
cd native && cargo fmt --all -- --check
+ # Fast syntactic-only scalafix check. Parses sources without compiling, so it
+ # surfaces version-independent style issues (e.g. RedundantSyntax) in seconds,
+ # long before the lint-java matrix finishes its ~3.5 min build. It also scans
+ # the spark-4.1 / spark-4.2 sources that lint-java skips (those profiles can't
+ # run -Psemanticdb yet), so it is the only gate covering them. The full rule
+ # set, including the semantic rules, still runs in lint-java.
+ scalafix-syntactic:
+ name: Lint Scala (syntactic)
+ runs-on: ubuntu-24.04
+ steps:
+ - uses: actions/checkout@v6
+
+ - name: Setup coursier
+ uses: coursier/setup-action@v1
+ with:
+ jvm: temurin:21
+
+ - name: Run syntactic scalafix check (no compile)
+ run: |
+ cs launch scalafix:0.14.6 -- \
+ --check \
+ --syntactic \
+ --config .scalafix-syntactic.conf \
+ --exclude '**/target/**' \
+ spark
+
lint-java:
needs: lint
name: Lint Java (${{ matrix.profile.name }})
diff --git a/.scalafix-syntactic.conf b/.scalafix-syntactic.conf
new file mode 100644
index 0000000000..343dd0101c
--- /dev/null
+++ b/.scalafix-syntactic.conf
@@ -0,0 +1,28 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+// Syntactic-only subset of .scalafix.conf. These rules parse source without
+// compilation and are independent of the Spark/Scala profile, so CI can check
+// them in seconds (see the scalafix-syntactic job in pr_build_linux.yml). The
+// full set, including the semantic rules, still runs in the lint-java job.
+rules = [
+ DisableSyntax,
+ LeakingImplicitClassVal,
+ NoValInForComprehension,
+ ProcedureSyntax,
+ RedundantSyntax
+]
diff --git a/spark/src/test/spark-4.1/org/apache/spark/sql/comet/CometDecimalArithmeticViewSuite.scala b/spark/src/test/spark-4.1/org/apache/spark/sql/comet/CometDecimalArithmeticViewSuite.scala
index a1d8e73e2c..0a16f8e55c 100644
--- a/spark/src/test/spark-4.1/org/apache/spark/sql/comet/CometDecimalArithmeticViewSuite.scala
+++ b/spark/src/test/spark-4.1/org/apache/spark/sql/comet/CometDecimalArithmeticViewSuite.scala
@@ -56,7 +56,7 @@ class CometDecimalArithmeticViewSuite extends CometTestBase {
assert(
dt === add.dataType,
s"CheckOverflow target $dt must match Add.dataType ${add.dataType}; mismatch " +
- s"causes the decimal buffer to be re-labelled at the wrong scale.")
+ "causes the decimal buffer to be re-labelled at the wrong scale.")
case other =>
fail(s"Expected DecimalPrecision.promote to wrap Add in CheckOverflow, got: $other")
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org