Skip to content

Commit 36edca8

Browse files
authored
Improve CONTRIBUTING.md
1 parent b53b6dc commit 36edca8

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

CONTRIBUTING.md

+37-37
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Pull requests for bug fixes are welcome, but before submitting new features or changes to current
66
functionality, please [open an issue](https://github.com/DataDog/dd-trace-java/issues/new)
7-
and discuss your ideas or propose the changes you wish to make first. After a resolution is reached a [PR can be
7+
and discuss your ideas or propose the changes you wish to make first. After a resolution is reached, a [PR can be
88
submitted](#pull-request-guidelines) for review.
99

1010
## Adding instrumentations
@@ -18,7 +18,7 @@ Check [How Instrumentations Work](docs/how_instrumentations_work.md) for a deep
1818
### Development environment quick check
1919

2020
Prior to contributing to the project, you can quickly check your development environment using the `./setup.sh` command
21-
line, and fix any issue found using the [Building documentation](BUILDING.md).
21+
line and fix any issue found using the [Building documentation](BUILDING.md).
2222

2323
### Automatic code formatting
2424

@@ -27,73 +27,73 @@ This file is supported by most common text editors.
2727

2828
We have automatic code formatting enabled in Gradle configuration using [Spotless](https://github.com/diffplug/spotless)
2929
[Gradle plugin](https://github.com/diffplug/spotless/tree/master/plugin-gradle).
30-
Main goal is to avoid extensive reformatting caused by different IDEs having different opinion about how things should
31-
be formatted by establishing single _point of truth_.
30+
Our main goal is to avoid extensive reformatting caused by different IDEs with different opinions about how things should
31+
be formatted by establishing a single _point of truth_.
3232

3333
To reformat all the files that need reformatting:
3434

3535
```bash
3636
./gradlew spotlessApply
3737
```
3838

39-
To run formatting verify task only:
39+
To run the formatting verify task only:
4040

4141
```bash
4242
./gradlew spotlessCheck
4343
```
4444

4545
#### IntelliJ IDEA
4646

47-
For IntelliJ IDEA, we suggest the following settings and plugin:
47+
For IntelliJ IDEA, we suggest the following settings and plugin.
4848

49-
In contrast to the [IntelliJ IDEA set up](CONTRIBUTING.md#intellij-idea) the default JVM to build and run tests from the
50-
command line should be Java 8.
49+
The default JVM to build and run tests from the command line should be Java 8.
5150

52-
* Use Java 8 to build and run tests:
53-
`Project Structure` > `Project` > `SDK` > Use a JDK 1.8
54-
* Configure import formatting:
55-
`Editor` > `Code Style` > `Java/Groovy` > `Imports`
51+
* Use Java 8 to build and run tests:
52+
* top right Settings icon -> `Project Structure` -> `Project` -> `SDK` -> `Download JDK...` -> `Version: 1.8` -> `Download`
53+
* Configure Java and Groovy import formatting:
54+
* top right Settings icon -> `Settings...` ->`Editor` > `Code Style` > `Java` > `Imports`
5655
* `Class count to use import with '*'`: `9999` (some number sufficiently large that is unlikely to matter)
5756
* `Names count to use static import with '*'`: `9999`
58-
* With java use the following import layout (groovy should still use the default) to ensure consistency with
59-
google-java-format:
57+
* Use the following import layout to ensure consistency with google-java-format:
6058
![import layout](https://user-images.githubusercontent.com/734411/43430811-28442636-94ae-11e8-86f1-f270ddcba023.png)
61-
* [Google Java Format](https://plugins.jetbrains.com/plugin/8527-google-java-format) plugin
59+
* top right Settings icon -> `Settings...` ->`Editor` > `Code Style` > `Groovy` > `Imports`
60+
* `Class count to use import with '*'`: `9999` (some number sufficiently large that is unlikely to matter)
61+
* `Names count to use static import with '*'`: `9999`
62+
* Install the [Google Java Format](https://plugins.jetbrains.com/plugin/8527-google-java-format) plugin
6263

6364
### Troubleshooting
6465

6566
* Gradle fails with a "too many open files" error.
66-
* You can check the `ulimit` for open files in your current shell by doing `ulimit -n` and raise it by
67-
calling `ulimit -n <new number>`
67+
* You can check the `ulimit` for open files in your current shell by running `ulimit -n`.
68+
* You can raise the `ulimit` by running `ulimit -n <new number>`
6869

6970
<details>
70-
<summary>More past issues</summary>
71+
<summary>Past issues</summary>
7172

7273
* When Gradle is building the project, the
7374
error `Could not find netty-transport-native-epoll-4.1.43.Final-linux-x86_64.jar` is shown.
74-
* Execute `rm -rf ~/.m2/repository/io/netty/netty-transport*` in a Terminal and re-build again.
75+
* Execute `rm -rf ~/.m2/repository/io/netty/netty-transport*` in a Terminal and re-build.
7576

7677
* IntelliJ 2021.3
77-
complains `Failed to find KotlinGradleProjectData for GradleSourceSetData` https://youtrack.jetbrains.com/issue/KTIJ-20173
78-
* Switch to `IntelliJ IDEA CE 2021.2.3`
79-
80-
* IntelliJ Gradle fails to import the project with `JAVA_11_HOME must be set to build Java 11 code`
81-
* A workaround is to run IntelliJ from terminal with `JAVA_11_HOME`
82-
* In order to verify what's visible from IntelliJ use `Add Configuration` bar and go
83-
to `Add New` -> `Gradle` -> `Environmental Variables`
78+
complains `Failed to find KotlinGradleProjectData for GradleSourceSetData` https://youtrack.jetbrains.com/issue/KTIJ-20173.
79+
* Switch to `IntelliJ IDEA CE 2021.2.3`.
8480

81+
* IntelliJ Gradle fails to import the project with `JAVA_11_HOME must be set to build Java 11 code`.
82+
* A workaround is to run IntelliJ from your terminal with `JAVA_11_HOME`.
83+
* In order to verify what's visible from IntelliJ, use the `Add Configuration` bar and go
84+
to `Add New` -> `Gradle` -> `Environmental Variables`.
8585
</details>
8686

87-
## Pull Request Guidelines
87+
## Pull request guidelines
8888

8989
### Draft first
9090

91-
When opening a pull request, please open it as a [draft](https://github.blog/2019-02-14-introducing-draft-pull-requests/) to not auto assign reviewers before you feel the pull request is in a reviewable state.
91+
When opening a pull request, please open it as a [draft](https://github.blog/2019-02-14-introducing-draft-pull-requests/) to not auto-assign reviewers before the pull request is in a reviewable state.
9292

93-
### Title Format
93+
### Title format
9494

9595
Pull request titles should briefly describe the proposed changes in a way that makes sense for the users.
96-
They should be a sentence starting with an infinitive verb, and avoid using prefixes like `[PROD]` or `PROD - ` in favor of [labels](#labels).
96+
They should be a sentence starting with an infinitive verb and avoid using prefixes like `[PROD]` or `PROD - ` in favor of [labels](#labels).
9797

9898
>[!CAUTION]
9999
> Don't title:
@@ -119,7 +119,7 @@ Both pull requests and issues should be labelled with at least a component or an
119119
>[!TIP]
120120
> Always add a `comp:` or `inst:` label, and a `type:` label.
121121
122-
Labels are not only used to categorize but also alter the continuous integration behavior:
122+
Labels are used to not only categorize but also alter the continuous integration behavior:
123123

124124
* `tag: no release note` to exclude a pull request from the next release changelog. Use it when changes are not relevant to the users like:
125125
* Internal features changes
@@ -133,16 +133,16 @@ Labels are not only used to categorize but also alter the continuous integration
133133
> For reference, the [full list of all labels available](https://github.com/DataDog/dd-trace-java/labels).
134134
> If you feel one is missing, let [the maintainer team](https://github.com/orgs/DataDog/teams/apm-java) know!
135135
136-
## Pull Request Reviews
136+
## Pull request reviews
137137

138-
### Review Expectations
138+
### Review expectations
139139

140-
After making you pull request ready for review by converting it from draft, you can expect getting an initial review comment within two working days, and a full review within a week of work.
140+
After making your pull request ready for review by converting it from a draft, you can expect to get an initial review comment within two working days and a full review within a week of work.
141141
If you don't receive any update, feel free to send a nice reminder to the assigned reviewers using pull request comments or our internal Slack channel.
142142

143-
### Stale Pull Requests
143+
### Stale pull requests
144144

145145
A pull request is considered "stale" if it has had no activity (comments, updates) for the last quarter.
146-
Stale PRs will be commented and labelled as such (using the `tag: stale` label), then closed if they still receive no update for a week after.
146+
Stale PRs will be commented and labeled as such (using the `tag: stale` label), and then closed if they receive no update after a week.
147147

148-
Closed PRs can be reopened at any time, but may be closed again if they ever meet the same stale conditions.
148+
Closed PRs can be reopened at any time, but they may be closed again if they meet the same stale conditions.

0 commit comments

Comments
 (0)