Skip to content

Commit f0f4eaa

Browse files
committed
Add CONTRIBUTING.md
1 parent 80201d3 commit f0f4eaa

File tree

2 files changed

+102
-0
lines changed

2 files changed

+102
-0
lines changed

CONTRIBUTING.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Contributing
2+
3+
## Code of Conduct
4+
5+
Current project supports the [Scala code of conduct][code-of-conduct] and
6+
wants all of its channels (GitHub, etc.) to be inclusive environments.
7+
8+
## Requirements
9+
10+
You will need the following tools:
11+
12+
* [Git][git]
13+
* [Java 8][java-8]
14+
* [SBT][sbt]
15+
* [Node][node]
16+
* [Yarn][yarn]
17+
18+
## Workflow
19+
20+
1. Create your own [fork][fork-and-pull] of the repository
21+
and work in a local branch based on `main`
22+
2. Write code
23+
3. Run `sbt format` (or `sbt fix` and `sbt fmt` sequentially) before creating the pull request
24+
4. [Submit a pull request](#submit-a-pull-request)
25+
26+
## Formatting
27+
28+
### Scalafix
29+
30+
We use [scalafix][scalafix] to apply some rules that are configured in `.scalafix.conf`.
31+
Make sure to run `sbt fix` to apply those rules.
32+
33+
### Scalafmt
34+
35+
We use [scalafmt][scalafmt] to format the source code according to the rules
36+
described in `.scalafmt.conf`, and recommend you to setup your editor to “format on save”,
37+
as documented [here][scalafmt-install].
38+
Make sure to run `sbt fmt` to ensure code formatting.
39+
40+
## Submit a pull request
41+
42+
* Pull requests should be submitted from a separate branch (e.g. using
43+
`git checkout -b "username/fix-123"`).
44+
* In general we discourage force pushing to an active pull-request branch that other people are
45+
commenting on or contributing to, and suggest using `git merge master` during development. Once
46+
development is complete, use `git rebase master` and force push to [clean up the history][squash].
47+
* The first line of a commit message should be no more than 72 characters long (to accommodate
48+
formatting in various environments).
49+
* Commit messages should general use the present tense, normal sentence capitalization, and no final
50+
punctuation.
51+
52+
## Publish a Release (note for maintainers)
53+
54+
Push a Git tag into `main` branch:
55+
56+
```bash
57+
$ git tag v0.0.1
58+
$ git push origin v0.0.1
59+
```
60+
61+
If release build fails, delete the tag from `main` branch
62+
63+
```bash
64+
$ git tag -d v0.0.1
65+
$ git push origin :refs/tags/v0.0.1
66+
```
67+
68+
then make the corrections and try again.
69+
70+
[code-of-conduct]: https://www.scala-lang.org/conduct/
71+
72+
[fork-and-pull]: https://help.github.com/articles/using-pull-requests/
73+
74+
[git]: https://git-scm.com/
75+
76+
[java-8]: https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
77+
78+
[node]: https://nodejs.org/en/
79+
80+
[remark-cli]: https://github.com/remarkjs/remark/tree/HEAD/packages/remark-cli
81+
82+
[remark-lint]: https://github.com/remarkjs/remark-lint
83+
84+
[remark-preset-lint-recommended]: https://github.com/remarkjs/remark-lint/tree/main/packages/remark-preset-lint-recommended
85+
86+
[scalafix]: https://scalacenter.github.io/scalafix/
87+
88+
[scalafmt]: https://scalameta.org/scalafmt/
89+
90+
[scalatest]: https://www.scalatest.org/
91+
92+
[scalafmt-install]: https://scalameta.org/scalafmt/docs/installation.html
93+
94+
[sbt]: http://www.scala-sbt.org/
95+
96+
[squash]: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html
97+
98+
[yarn]: https://yarnpkg.com/

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ Start:
5757
1. `sbt dev`
5858
2. Open in browser `localhost:8080`
5959

60+
## Contributing
61+
62+
See [CONTRIBUTING.md](/CONTRIBUTING.md) for more details about how to contribute.
63+
6064
## License
6165

6266
This project is licensed under the terms of the [Apache License, Version 2.0](/LICENSE).

0 commit comments

Comments
 (0)