Skip to content

Commit 3b42108

Browse files
authored
Merge branch 'main' into system-properties-bridge
2 parents 18d719d + 8c87fc3 commit 3b42108

File tree

7 files changed

+37
-23
lines changed

7 files changed

+37
-23
lines changed

.github/config/.markdownlint-cli2.yaml

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

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
1414

15+
- uses: jdx/mise-action@9dc7d5dd454262207dea3ab5a06a3df6afc8ff26 # v3.4.1
16+
1517
- name: Run markdownlint
1618
run: |
17-
npx [email protected] --config .github/config/.markdownlint-cli2.yaml "**/*.md"
19+
if ! mise run lint:markdown; then
20+
echo "markdownlint failed. To auto-fix many issues locally, run:"
21+
echo " mise run lint:markdown --fix"
22+
exit 1
23+
fi

.markdownlint.yaml

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

.mise/tasks/lint/markdown.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
#MISE description="Lint markdown files"
3+
#MISE flag "--fix" help="Automatically fix issues"
4+
5+
set -e
6+
7+
if [ "${usage_fix}" = "true" ]; then
8+
markdownlint-cli2 --fix "**/*.md" "#**/build" "#CHANGELOG.md" "#licenses/licenses.md"
9+
else
10+
markdownlint-cli2 "**/*.md" "#**/build" "#CHANGELOG.md" "#licenses/licenses.md"
11+
fi

instrumentation/opentelemetry-api/opentelemetry-api-1.56/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/opentelemetryapi/v1_56/incubator/config/ApplicationDeclarativeConfigProperties156Incubator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ public <T> List<T> getScalarList(String name, Class<T> scalarType, List<T> defau
9292
@Nullable
9393
@Override
9494
public DeclarativeConfigProperties getStructured(String name) {
95-
return new ApplicationDeclarativeConfigProperties156Incubator(
96-
instrumentationConfig.getStructured(name));
95+
io.opentelemetry.api.incubator.config.DeclarativeConfigProperties config =
96+
instrumentationConfig.getStructured(name);
97+
return config == null ? null : new ApplicationDeclarativeConfigProperties156Incubator(config);
9798
}
9899

99100
@Nullable

instrumentation/servlet/servlet-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/servlet/AsyncRunnableWrapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package io.opentelemetry.javaagent.instrumentation.servlet;
77

88
import io.opentelemetry.context.Context;
9+
import io.opentelemetry.context.Scope;
910

1011
public class AsyncRunnableWrapper<REQUEST> implements Runnable {
1112
private final ServletHelper<REQUEST, ?> helper;
@@ -27,7 +28,7 @@ public static <REQUEST> Runnable wrap(ServletHelper<REQUEST, ?> helper, Runnable
2728

2829
@Override
2930
public void run() {
30-
try {
31+
try (Scope ignored = context.makeCurrent()) {
3132
runnable.run();
3233
} catch (Throwable throwable) {
3334
helper.recordAsyncException(context, throwable);

mise.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[tools]
22
lychee = "0.21.0"
3+
markdownlint-cli2 = "0.17.1"
34

45
[settings]
56
# Only install tools explicitly defined in the [tools] section above

0 commit comments

Comments
 (0)