Skip to content

Conversation

SemyonSinchenko
Copy link
Collaborator

This PR closes #500

Changes:

  • .scalafmt.conf is added with content exactly like in the Apache Spark Project
  • scalafmt plugin is added to the plugins
  • all the code is reformatted according to the rules
  • checking the formatting is added to the compile stage
  • .metals is added to the .gitignore

P.S. Metals is the most popular LSP for Scala that is used in VSCode, Vim / NeoVim, Emacs, Sublime, etc. I think it is nice to have it in .gitignore because it simplify the working with git and reduce a chance of accidentally pushing something not related to the project itself.
P.P.S. All the changes in the scala code is related to formatting only! There are no actual changes of the logic.

@SemyonSinchenko
Copy link
Collaborator Author

@rjurney @bjornjorgensen Hello! Can you review it, please? It may look huge but there are no changes in the code, only formatting of the code. Thanks!

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 89.50617% with 17 lines in your changes missing coverage. Please review.

Project coverage is 90.73%. Comparing base (bc487ef) to head (cd9edca).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/main/scala/org/graphframes/GraphFrame.scala 85.00% 9 Missing ⚠️
src/main/scala/org/graphframes/lib/Pregel.scala 77.77% 4 Missing ⚠️
.../scala/org/graphframes/lib/AggregateMessages.scala 75.00% 2 Missing ⚠️
...cala/org/graphframes/lib/ConnectedComponents.scala 93.75% 1 Missing ⚠️
.../scala/org/graphframes/lib/GraphXConversions.scala 87.50% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #507      +/-   ##
==========================================
- Coverage   91.43%   90.73%   -0.70%     
==========================================
  Files          18       18              
  Lines         829      896      +67     
  Branches       52      100      +48     
==========================================
+ Hits          758      813      +55     
- Misses         71       83      +12     

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

Copy link
Contributor

@bjornjorgensen bjornjorgensen left a comment

Choose a reason for hiding this comment

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

LGTM

@rjurney
Copy link
Collaborator

rjurney commented Feb 11, 2025

@SemyonSinchenko oh, one thing - are these the same settings as Spark? The plan is to eventually merge GraphFrames into Spark main, so consistency with their settings would be nice.

@SemyonSinchenko
Copy link
Collaborator Author

@SemyonSinchenko oh, one thing - are these the same settings as Spark? The plan is to eventually merge GraphFrames into Spark main, so consistency with their settings would be nice.

I copied the whole .scalafmt from the Apache Spark repository. So yes, these settings are the same.

@SemyonSinchenko
Copy link
Collaborator Author

@rjurney Can we merge this one? It allows to apply scalafmt to all other pending PRs.

@bjornjorgensen
Copy link
Contributor

@rjurney are there anything wrong with this PR?

@rjurney rjurney merged commit 0b566d0 into graphframes:master Feb 16, 2025
3 checks passed
@rjurney
Copy link
Collaborator

rjurney commented Feb 16, 2025

Merging... @bjornjorgensen nothing wrong :)

@SemyonSinchenko SemyonSinchenko deleted the 500-scalafmt branch April 6, 2025 09:14
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.

chore: scalafmt file and linting rules
4 participants