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

Automatically format source code with pre-commit #812

Merged
merged 3 commits into from
Jan 31, 2023

Conversation

komamitsu
Copy link
Contributor

@komamitsu komamitsu commented Jan 30, 2023

ScalarDB developers execute gradlew spotlessApply or IDE code formatter manually as a part of development. But the manual operation should be automated and documented for new contributors. This PR describes how to setup the automated operation. The drawback is every commit invokes gradlew spotless and it would increase the latency of commit a bit (especially for the first invocation of Gradle daemon.)

@komamitsu komamitsu force-pushed the git-commit-hook-to-format branch from 73c1cfe to 55846f7 Compare January 30, 2023 07:00
@komamitsu komamitsu marked this pull request as ready for review January 30, 2023 07:07
@komamitsu komamitsu changed the title Format source code with pre-commit Automatically format source code with pre-commit Jan 30, 2023
Copy link
Collaborator

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

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

LGTM other than what I commented. Please take a look when you have time!

@@ -62,6 +62,20 @@ Here are the contributors we are especially thankful for:
- [Toshihiro Suzuki](https://github.com/brfrn169) - created [Phoenix adapter](https://github.com/scalar-labs/scalardb-phoenix) for ScalarDB
- [Yonezawa-T2](https://github.com/Yonezawa-T2) - reported bugs around Serializable and proposed a new Serializable strategy (now named Extra-Read)

## Development
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should apply the same change to docs/index.md as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 7d8cfac

@komamitsu komamitsu requested a review from brfrn169 January 31, 2023 01:39
Copy link
Contributor

@Torch3333 Torch3333 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

Copy link
Collaborator

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@brfrn169 brfrn169 merged commit 35418cd into master Jan 31, 2023
@brfrn169 brfrn169 deleted the git-commit-hook-to-format branch January 31, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants