Skip to content

Commit f14985d

Browse files
FSchumachervlsi
authored andcommitted
Add spotless rules for markdown files
And apply those rules to our markdown files
1 parent 9143129 commit f14985d

File tree

3 files changed

+37
-24
lines changed

3 files changed

+37
-24
lines changed

CODE_OF_CONDUCT.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ we invite anyone to participate in our community. We preferably use public metho
1717
## **Be empathetic**
1818
welcoming, friendly, and patient. We work together to resolve conflict, assume good intentions, and do our best to act in an empathetic fashion. We may all experience some frustration from time to time, but we do not allow frustration to turn into a personal attack. A community where people feel uncomfortable or threatened is not a productive one. We should be respectful when dealing with other community members as well as with people outside our community.
1919

20-
## **Be collaborative**,
20+
## **Be collaborative**,
2121
our work will be used by other people, and in turn we will depend on the work of others. When we make something for the benefit of the project, we are willing to explain to others how it works, so that they can build on the work to make it even better. Any decision we make will affect users and colleagues, and we take those consequences seriously when making decisions.
2222

23-
## **Be inquisitive**,
23+
## **Be inquisitive**,
2424
nobody knows everything! Asking questions early avoids many problems later, so questions are encouraged, though they may be directed to the appropriate forum. Those who are asked should be responsive and helpful, within the context of our shared goal of improving Apache project code.
2525

2626
## **Be careful in the words that we choose**,
@@ -37,14 +37,14 @@ Whether we are participating as professionals or volunteers, we value profession
3737
* Repeated harassment of others. In general, if someone asks you to stop, then stop.
3838
* Advocating for, or encouraging, any of the above behaviour.
3939

40-
## **Be concise**,
40+
## **Be concise**,
4141
keep in mind that what you write once will be read by hundreds of persons. Writing a short email means people can understand the conversation as efficiently as possible. Short emails should always strive to be empathetic, welcoming, friendly and patient. When a long explanation is necessary, consider adding a summary.
4242

4343
Try to bring new ideas to a conversation so that each mail adds something unique to the thread, keeping in mind that the rest of the thread still contains the other messages with arguments that have already been made.
4444

4545
Try to stay on topic, especially in discussions that are already fairly large.
4646

47-
## **Step down considerately**,
47+
## **Step down considerately**,
4848
members of every project come and go. When somebody leaves or disengages from the project they should tell people they are leaving and take the proper steps to ensure that others can pick up where they left off. In doing so, they should remain respectful of those who continue to participate in the project and should not misrepresent the project's goals or achievements. Likewise, community members should respect any individual's choice to leave the project.
4949

5050
# Diversity Statement

build.gradle.kts

+13
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,19 @@ allprojects {
259259
trimTrailingWhitespace()
260260
endWithNewline()
261261
}
262+
if (project == rootProject) {
263+
// Spotless does not exclude subprojects when using target(...)
264+
// So **/*.md is enough to scan all the md files in JMeter codebase
265+
// See https://github.com/diffplug/spotless/issues/468
266+
format("markdown") {
267+
target("**/*.md")
268+
// Flot is known to have trailing whitespace, so the files
269+
// are kept in their original format (e.g. to simplify diff on library upgrade)
270+
targetExclude("bin/report-template/**/flot*/*.md")
271+
trimTrailingWhitespace()
272+
endWithNewline()
273+
}
274+
}
262275
}
263276
}
264277
plugins.withType<JavaPlugin> {

gradle.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ Useful commands (`gw` comes from https://github.com/dougborg/gdub, otherwise `./
1717

1818
# Display all submodules
1919
gw projects
20-
20+
2121
# Different tasks for current module
2222
gw tasks
2323

2424
## Cleaning build directories
2525

2626
Technically `clean` should not be required, every time it is required it might be a bug.
27-
However it might be useful to perform a "clean" build:
27+
However it might be useful to perform a "clean" build:
2828

2929
# Cleans current project (submodule)
3030
gw clean
31-
31+
3232
# Cleans the specified project
3333
gw :src:core:clean
3434

@@ -54,26 +54,26 @@ However it might be useful to perform a "clean" build:
5454

5555
# Run RAT
5656
gw rat
57-
57+
5858
### Code Formatting
59-
59+
6060
# Run spotlessApply and checkstyleAll
6161
gw style
62-
62+
6363
# Run checkstlye for all
6464
gw checkstyleAll
65-
65+
6666
#### Fine Grained Formatting Commands
67-
67+
6868
# Run checkstyle for main (non-test) code
6969
gw checkstyleMain
70-
70+
7171
# Run checkstyle for test code
7272
gw checkstyleTest
73-
73+
7474
# Run Spotless checks
7575
gw spotlessCheck
76-
76+
7777
# Fix any issues found by Spotless
7878
gw spotlessApply
7979

@@ -87,13 +87,13 @@ However it might be useful to perform a "clean" build:
8787

8888
# Just build jar (see build/libs/*.jar)
8989
gw jar
90-
90+
9191
# "build" is a default task to "execute all the actions"
9292
gw build
93-
93+
9494
# Test might be skipped by `-x test` (Gradle's default way to skip task by name)
9595
gw -x test build
96-
96+
9797
# Build project in parallel
9898
gw build --parallel
9999

@@ -105,26 +105,26 @@ build only the required jars and files.
105105

106106
# Runs all the tests (unit tests, checkstyle, etc)
107107
gw check
108-
108+
109109
# Runs just unit tests
110110
gw test
111-
111+
112112
# Runs just core tests
113113
gw :src:core:test
114114

115115
## Coverage
116116

117117
# Generates code coverage report for the test task to build/reports/jacoco/test/html
118118
gw jacocoTestReport
119-
119+
120120
# Generate combined coverage report
121121
gw jacocoReport
122122

123123
## Generate Javadocs
124124

125125
# Builds javadoc to build/docs/javadoc subfolder
126126
gw javadoc
127-
127+
128128
# Builds javadoc jar to build/libs/jorphan-javadoc.jar
129129
gw javadocJar
130130

@@ -152,14 +152,14 @@ build only the required jars and files.
152152

153153
## Signing
154154

155-
It is implemented via [gradle signing plugin](https://docs.gradle.org/5.2.1/userguide/signing_plugin.html),
155+
It is implemented via [gradle signing plugin](https://docs.gradle.org/5.2.1/userguide/signing_plugin.html),
156156
so it is done automatically provided credentials are specified via
157157
[signatory credentials](https://docs.gradle.org/5.2.1/userguide/signing_plugin.html#sec:signatory_credentials)
158158

159159
# Signs all the artifacts of the current module
160160
# see results in build/**/*.asc
161161
gw sign
162-
> **Note:** signing is performed as a part of *release artifact build* so it will be
162+
> **Note:** signing is performed as a part of *release artifact build* so it will be
163163
> performed with `gw :src:dist:assemble`
164164
165165
## Releasing

0 commit comments

Comments
 (0)