Skip to content

Commit 17f5168

Browse files
committed
Adding checkstyle notes in README and contribution guidelines
Signed-off-by: Soby Chacko <[email protected]>
1 parent d93ab77 commit 17f5168

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed

CONTRIBUTING.adoc

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ what kind of changes are likely to be accepted; and what to expect from the Spri
77
Please refer back to this document as a checklist before issuing any pull request; this will save time for everyone!
88

99
== Code of Conduct
10-
This project adheres to the Contributor Covenant link:CODE_OF_CONDUCT.adoc[code of conduct].
10+
This project adheres to the Contributor Covenant https://github.com/spring-projects/spring-ai#coc-ov-file[code of conduct].
1111
By participating, you are expected to uphold this code. Please report unacceptable behavior to
1212
1313

@@ -133,6 +133,25 @@ This command, will provide the following output, which in this case shows a nice
133133
If you see intersecting lines, that usually means that you forgot to rebase you branch.
134134
As mentioned earlier, **please rebase against main** before issuing a pull request.
135135

136+
== Enabling Checkstyle
137+
138+
Checkstyles are currently disabled in the project.
139+
However, we encourage all PR contributors to run checkstyles by enabling them before submitting a PR.
140+
141+
You can enable them by doing the following:
142+
143+
```shell
144+
./mvnw clean package -DskipTests -Ddisable.checks=false
145+
```
146+
147+
=== Source Code Style
148+
149+
Spring AI source code checkstyle tries to follow the checkstyle guidelines used by the core Spring Framework project with some exceptions.
150+
The wiki pages
151+
[Code Style](https://github.com/spring-projects/spring-framework/wiki/Code-Style) and
152+
[IntelliJ IDEA Editor Settings](https://github.com/spring-projects/spring-framework/wiki/IntelliJ-IDEA-Editor-Settings)
153+
define the source file coding standards we use along with some IDEA editor settings we customize.
154+
136155
== Mind the whitespace
137156

138157
Please carefully follow the whitespace and formatting conventions already present in the framework.
@@ -265,4 +284,4 @@ Also by using specific
265284
https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword[keywords]
266285
you can link to a GitHub issue like so:
267286

268-
Closes #10
287+
Closes #10

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,36 @@ To build the docs
115115

116116
The docs are then in the directory `spring-ai-docs/target/antora/site/index.html`
117117

118+
### Formatting the Source Code
119+
118120
To reformat using the [java-format plugin](https://github.com/spring-io/spring-javaformat)
119121
```shell
120122
./mvnw spring-javaformat:apply
121123
```
124+
### Updating License Headers
122125

123126
To update the year on license headers using the [license-maven-plugin](https://oss.carbou.me/license-maven-plugin/#goals)
124127
```shell
125128
./mvnw license:update-file-header -Plicense
126129
```
130+
### Javadocs
127131

128132
To check javadocs using the [javadoc:javadoc](https://maven.apache.org/plugins/maven-javadoc-plugin/)
129133
```shell
130134
./mvnw javadoc:javadoc -Pjavadoc
131135
```
136+
### Enabling Checkstyle
132137

133-
To build with checkstyles enabled.
134138
Checkstyles are currently disabled, but you can enable them by doing the following:
139+
135140
```shell
136141
./mvnw clean package -DskipTests -Ddisable.checks=false
137142
```
143+
144+
#### Source Code Style
145+
146+
Spring AI source code checkstyle tries to follow the checkstyle guidelines used by the core Spring Framework project with some exceptions.
147+
The wiki pages
148+
[Code Style](https://github.com/spring-projects/spring-framework/wiki/Code-Style) and
149+
[IntelliJ IDEA Editor Settings](https://github.com/spring-projects/spring-framework/wiki/IntelliJ-IDEA-Editor-Settings)
150+
define the source file coding standards we use along with some IDEA editor settings we customize.

0 commit comments

Comments
 (0)