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

Commit c4e3979

Browse files
committed
chore: verify google code format
1 parent b6cee6a commit c4e3979

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

CONTRIBUTING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# How to contribute
2+
3+
We're really glad you're reading this, because we need more volunteer developers
4+
to help with this project!
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.
8+
9+
## Answering questions and writing documentation
10+
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.
15+
16+
Continuous integration will make sure that the changes are automatically deployed to
17+
https://www.graphql-java-kickstart.com.
18+
19+
## Submitting changes
20+
21+
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
25+
(one feature per commit).
26+
27+
## Coding conventions
28+
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.
34+
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+
```
40+
41+
### SonarLint
42+
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.

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ plugins {
2525
id "org.sonarqube" version "3.2.0"
2626
id "jacoco"
2727
id 'io.codearte.nexus-staging' version '0.30.0'
28+
id 'com.github.sherter.google-java-format' version '0.9' apply false
2829
}
2930

3031
sonarqube {
@@ -48,6 +49,7 @@ subprojects {
4849
}
4950
apply plugin: 'maven-publish'
5051
apply plugin: 'signing'
52+
apply plugin: 'com.github.sherter.google-java-format'
5153

5254
group "$PROJECT_GROUP"
5355

@@ -114,6 +116,8 @@ subprojects {
114116
}
115117

116118
compileJava.dependsOn(processResources)
119+
120+
compileJava.mustRunAfter verifyGoogleJavaFormat
117121
}
118122

119123
if (!it.name.startsWith('example')) {

0 commit comments

Comments
 (0)