|
1 | 1 | # How to contribute |
2 | 2 |
|
3 | | -We're really glad you're reading this, because we need more volunteer developers |
4 | | -to help with this project! |
| 3 | +We're really glad you're reading this, because we need more volunteer developers to help with this |
| 4 | +project! |
5 | 5 |
|
6 | | -We can use all the help we can get on all our [GraphQL Java Kickstart](https://github.com/graphql-java-kickstart) |
7 | | -projects. This work ranges from adding new features, fixing bugs, and answering questions to writing documentation. |
| 6 | +We can use all the help we can get on all |
| 7 | +our [GraphQL Java Kickstart](https://github.com/graphql-java-kickstart) |
| 8 | +projects. This work ranges from adding new features, fixing bugs, and answering questions to writing |
| 9 | +documentation. |
8 | 10 |
|
9 | 11 | ## Answering questions and writing documentation |
10 | 12 |
|
11 | | -A lot of the questions asked on Spectrum or Github are caused by a lack of documentation. |
12 | | -We should strive from now on to answer questions by adding content to |
13 | | -our [documentation](https://github.com/graphql-java-kickstart/documentation) and referring |
14 | | -them to the newly created content. |
| 13 | +A lot of the questions asked on Spectrum or Github are caused by a lack of documentation. We should |
| 14 | +strive from now on to answer questions by adding content to |
| 15 | +our [documentation](https://github.com/graphql-java-kickstart/documentation) and referring them to |
| 16 | +the newly created content. |
15 | 17 |
|
16 | | -Continuous integration will make sure that the changes are automatically deployed to |
| 18 | +Continuous integration will make sure that the changes are automatically deployed to |
17 | 19 | https://www.graphql-java-kickstart.com. |
18 | 20 |
|
19 | 21 | ## Submitting changes |
20 | 22 |
|
21 | 23 | Please send a Pull Request with a clear list of what you've done using the |
22 | | -[Github flow](https://guides.github.com/introduction/flow/). We can always use more |
23 | | -test coverage, so we'd love to see that in the pull requests too. And make sure to |
24 | | -follow our coding conventions (below) and make sure all your commits are atomic |
| 24 | +[Github flow](https://guides.github.com/introduction/flow/). We can always use more test coverage, |
| 25 | +so we'd love to see that in the pull requests too. And make sure to follow our coding conventions ( |
| 26 | +below) and make sure all your commits are atomic |
25 | 27 | (one feature per commit). |
26 | 28 |
|
27 | 29 | ## Coding conventions |
28 | 30 |
|
29 | | -We use Google Style guides for our projects. See the |
30 | | -[Java Style Guide](https://google.github.io/styleguide/javaguide.html) for a detailed |
31 | | -description. You can download the |
32 | | -[IntelliJ Java Google Style](https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml) |
33 | | -to import in these settings in IntelliJ. |
| 31 | +We use Google Java Style guide for our projects. See the |
| 32 | +[Java Style Guide](https://google.github.io/styleguide/javaguide.html) for a detailed description. |
| 33 | +The code style is enforced in our CI workflows. This means you'll have to make sure that your |
| 34 | +commits have the same formatting. |
34 | 35 |
|
35 | | -These conventions are checked during the build phase. If the build fails because |
36 | | -the code is not using the correct style you can fix this easily by running a gradle task |
37 | | -```bash |
38 | | -./gradlew googleJavaFormat |
39 | | -``` |
| 36 | +Best way to do this is to install the |
| 37 | +[google java format plugin](https://plugins.jetbrains.com/plugin/8527-google-java-format). Once |
| 38 | +installed you'll have to enable it for the project. From that point on you can hit CTRL+ALT+L to |
| 39 | +reformat the code. Or even better configure the commit options in IntelliJ IDEA to Reformat Code |
| 40 | +before commit: |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +**Warning** |
| 45 | +There's also an XML code style file available that you could import in your IDE. That approach will |
| 46 | +never be exactly in line with the checks and formatting that the google-java-format plugin applies. |
40 | 47 |
|
41 | 48 | ### SonarLint |
42 | 49 |
|
43 | | -It would also be very helpful to install the SonarLint plugin in your IDE and fix any |
44 | | -relevant SonarLint issues before pushing a PR. We're aware that the current state |
45 | | -of the code raises a lot of SonarLint issues out of the box, but any help in reducing |
46 | | -that is appreciated. More importantly we don't increase that technical debt. |
| 50 | +It would also be very helpful to install the SonarLint plugin in your IDE and fix any relevant |
| 51 | +SonarLint issues before pushing a PR. We're aware that the current state of the code raises a lot of |
| 52 | +SonarLint issues out of the box, but any help in reducing that is appreciated. More importantly we |
| 53 | +don't increase that technical debt. |
0 commit comments