Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit f637fba

Browse files
committed
chore: update google-java-format plugin in contributing guidelines
1 parent 6eee341 commit f637fba

File tree

2 files changed

+33
-26
lines changed

2 files changed

+33
-26
lines changed

CONTRIBUTING.md

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,53 @@
11
# How to contribute
22

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!
55

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.
810

911
## Answering questions and writing documentation
1012

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.
1517

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
1719
https://www.graphql-java-kickstart.com.
1820

1921
## Submitting changes
2022

2123
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
2527
(one feature per commit).
2628

2729
## Coding conventions
2830

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.
3435

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+
![screenshot-reformat-code-before-commit.png](screenshot-reformat-code-before-commit.png)
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.
4047

4148
### SonarLint
4249

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.
17.6 KB
Loading

0 commit comments

Comments
 (0)