Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Enforce scalafix check in CI #203

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

advancedxy
Copy link
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

When developing #179 and CometRowToColumnar support, I noticed suspicious errors. It turns out that scalafix in the java-test action rewrites the scala source code and have conflict result with scalafmt(used by spotless). It's hard to debug such cases and quite annoying.

What changes are included in this PR?

  1. enforce scalafix check in CI rather rewriting silently
  2. apply scalafix:scalafix to the current codebase
  3. refine format target in Makefile so that developers can format code by simply type: make format
  4. add a section about code formatting before submit a PR

How are these changes tested?

Existing test and CI checks

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 33.30%. Comparing base (93e81cc) to head (9b1472b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #203      +/-   ##
============================================
- Coverage     33.30%   33.30%   -0.01%     
  Complexity      767      767              
============================================
  Files           107      107              
  Lines         35372    35375       +3     
  Branches       7657     7658       +1     
============================================
  Hits          11782    11782              
- Misses        21144    21145       +1     
- Partials       2446     2448       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@advancedxy
Copy link
Contributor Author

cc @sunchao @viirya as CI should be passing.

Copy link
Member

@sunchao sunchao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (pending CI)

@@ -38,6 +38,7 @@ clean:
bench:
cd core && RUSTFLAGS="-Ctarget-cpu=native" cargo bench $(filter-out $@,$(MAKECMDGOALS))
format:
cd core && cargo fmt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sunchao sunchao merged commit d069713 into apache:main Mar 13, 2024
26 checks passed
@sunchao
Copy link
Member

sunchao commented Mar 13, 2024

Merged, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants