-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add CONTRIBUTING.md along with code style tasks #273
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Contributing to Sbt Reproducible Builds | ||
|
||
## Applying code style to the project | ||
|
||
The project uses both [scalafix](https://scalacenter.github.io/scalafix/) and | ||
[scalafmt](https://scalameta.org/scalafmt/) to ensure code quality which is automatically checked on every | ||
PR. If you would like to check for any potential code style problems locally you can run `sbt checkCodeStyle` and if | ||
you want to apply the code style then you can run `sbt applyCodeStyle`. | ||
|
||
## Ignoring formatting commits in git blame | ||
|
||
Throughout the history of the codebase various formatting commits have been applied as the scalafmt style has evolved over time, if desired | ||
one can setup git blame to ignore these commits. The hashes for these specific are stored in [this file](.git-blame-ignore-revs) so to configure | ||
git blame to ignore these commits you can execute the following. | ||
|
||
```shell | ||
git config blame.ignoreRevsFile .git-blame-ignore-revs | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,3 +54,6 @@ inThisBuild( | |
) | ||
) | ||
) | ||
|
||
addCommandAlias("applyCodeStyle", ";+clean ;scalafixAll ;scalafmtAll; scalafmtSbt") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Also |
||
addCommandAlias("checkCodeStyle", ";+clean ;scalafixAll --check ;scalafmtCheckAll; scalafmtSbtCheck") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.