Skip to content

Commit eeac17e

Browse files
authored
Update to markdownlint-cli2 (#15448)
1 parent 9c01934 commit eeac17e

File tree

18 files changed

+53
-37
lines changed

18 files changed

+53
-37
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
2+
# and https://github.com/DavidAnson/markdownlint-cli2
3+
4+
config:
5+
ul-style: false
6+
line-length: false
7+
no-duplicate-heading:
8+
siblings_only: true
9+
ol-prefix:
10+
style: ordered
11+
no-inline-html: false
12+
fenced-code-language: false
13+
no-trailing-punctuation:
14+
punctuation: ".,;:" # allowing exclamation points and question marks at end of sentences
15+
16+
ignores:
17+
- "**/build/**"
18+
- "CHANGELOG.md"
19+
- "licenses/licenses.md"

.github/config/markdownlint.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/repository-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ private admin repo.
1414
- `GRADLE_PUBLISH_KEY` - owned by [@trask](https://github.com/trask)
1515
- `GRADLE_PUBLISH_SECRET` - owned by [@trask](https://github.com/trask)
1616
- `NVD_API_KEY` - stored in OpenTelemetry-Java 1Password
17-
- Generated at https://nvd.nist.gov/developers/request-an-api-key
17+
- Generated at <https://nvd.nist.gov/developers/request-an-api-key>
1818
- Key is associated with [@trask](https://github.com/trask)'s gmail address
1919
- `SONATYPE_KEY` - owned by [@trask](https://github.com/trask)
2020
- `SONATYPE_USER` - owned by [@trask](https://github.com/trask)

.github/workflows/reusable-markdown-lint-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414

1515
- name: Run markdownlint
1616
run: |
17-
npx markdownlint-cli@0.46.0 -c .github/config/markdownlint.yml -p .gitignore **/*.md -i licenses/licenses.md
17+
npx markdownlint-cli2@0.17.1 --config .github/config/.markdownlint-cli2.yaml "**/*.md"

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Before submitting new features or changes to current functionality, it is recomm
66
[open an issue](https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/new)
77
and discuss your ideas or propose the changes you wish to make.
88

9-
109
## Breaking Changes
1110

1211
When your PR introduces a breaking change:

docs/contributing/documenting-instrumentation.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,9 @@ Every javaagent instrumentation module should have a README.md file in the javaa
6969
| `property.name` | Type | Default | Description |
7070
```
7171

72-
7372
**Note:** At some point we will likely automate the generation of this javaagent README.md file
7473
using the metadata.yaml file described below.
7574

76-
7775
## Metadata.yaml Files
7876

7977
Each instrumentation should have a `metadata.yaml` file in the root of the instrumentation directory
@@ -168,7 +166,6 @@ Some notes when writing descriptions:
168166
* Example: "This instrumentation enriches HTTP server spans with route information, and enables
169167
controller spans for Apache CXF JAX-WS web services (controller spans are disabled by default)."
170168

171-
172169
### Semantic Conventions
173170

174171
If the instrumentation adheres to one or more specific semantic conventions, include a
@@ -228,12 +225,10 @@ Each configuration should include:
228225
* `type`: The data type of the configuration value. Supported types are: `boolean`, `string`, `list`, and `map`.
229226
* `default`: The default value for the configuration.
230227

231-
232228
If a configuration enables experimental attributes, list them, for example:
233229

234230
> Enables experimental span attributes `couchbase.operation_id` and `couchbase.local.address`.
235231

236-
237232
### Classification (optional)
238233

239234
If an instrumentation module does not specify a `classification`, it is assumed to be `library`.
@@ -251,7 +246,6 @@ The primary way this `classification` is used is to group and filter instrumenta
251246
utility in tooling and documentation. If you are unsure which classification to use, you can omit
252247
this field, and it will default to `library`.
253248

254-
255249
### Disabled by Default (optional)
256250

257251
If an instrumentation is disabled by default, set `disabled_by_default: true`. This indicates that

docs/contributing/running-tests.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,14 @@ old containers, images and volumes using `docker system prune --volumes`.
100100
For some container environments, such as rootless Podman or a remotely hosted Docker,
101101
testcontainers may need additional configuration to successfully run the tests.
102102
The following environment variables can be used for configuration:
103+
103104
- `TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE` - The location of the Docker socket on the host. Default is `/var/run/docker.sock`
104105
- `TESTCONTAINERS_HOST_OVERRIDE` - The hostname used for container-to-container communication. Default Docker is `localhost`, but rootless Podman uses `host.containers.internal`
105106

106-
# Troubleshooting CI Test Failures
107+
## Troubleshooting CI Test Failures
107108

108109
See [Troubleshooting CI Test Failures](../../CONTRIBUTING.md#troubleshooting-pr-build-failures) for common issues and solutions.
109110

110-
# Debugging
111+
## Debugging
111112

112113
For information on debugging tests or instrumentation, see [Debugging](debugging.md).

docs/contributing/style-guideline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Method parameters and local variables should never be declared `final`.
102102

103103
## `@Nullable` annotation usage
104104

105-
**Note: this section is aspirational, as opposed to a reflection of the current codebase**
105+
**Note: this section is aspirational, as opposed to a reflection of the current codebase.**
106106

107107
All parameters and fields which can be `null` should be annotated with `@Nullable`
108108
(specifically `javax.annotation.Nullable`, which is included by the

docs/contributing/writing-instrumentation-module.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ In order to preserve compatibility with both instrumentation strategies, we have
407407
from the advice method annotations.
408408

409409
We have three sets of instrumentation modules:
410+
410411
- "inlined only": only compatible with "inlined", `isIndyModule` returns `false`.
411412
- "indy compatible": compatible with both "indy" and "inlined", do not override `isIndyModule`, advices are modified with `AdviceTransformer` to be made "indy native" or "inlined" at runtime.
412413
- "indy native": only compatible with "indy" `isIndyModule` returns `true`.

docs/contributing/writing-instrumentation.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ You can use the `@RegisterExtension` annotation to make sure that the instrument
282282
picked up by JUnit. Then, return the same extension instance in the `testing()` method
283283
implementation so that it's used in all test scenarios implemented in the abstract class.
284284

285-
286285
## Writing Java agent instrumentation
287286

288287
Now that you have working and tested library instrumentation, implement the javaagent

0 commit comments

Comments
 (0)