Skip to content

Commit 03e0f51

Browse files
authored
Add test cases to cover a paragraph after a list (#508)
1 parent 4cb5868 commit 03e0f51

File tree

12 files changed

+53
-17
lines changed

12 files changed

+53
-17
lines changed

crates/weaver_codegen_test/semconv_registry/registry/error.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ groups:
3636
it's RECOMMENDED to:
3737
3838
* Use a domain-specific attribute
39-
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
39+
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not
40+
41+
And something more.

crates/weaver_forge/data/mini_registry_for_comments/error.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ groups:
3636
it's RECOMMENDED to:
3737
3838
* Use a domain-specific attribute
39-
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
39+
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not
40+
41+
And something more.

crates/weaver_forge/expected_output/comment_format/example.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ const DNS_QUESTION_NAME = ""
8383
// - Use a domain-specific attribute
8484
// - Set `error.type` to capture all errors, regardless of whether they are
8585
// defined within the domain-specific set or not
86+
//
87+
// And something more
8688
const ERROR_TYPE = ""
8789

8890
// Examples of comments for group other

crates/weaver_forge/expected_output/comment_format/example.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
* <li>Use a domain-specific attribute
6565
* <li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not
6666
* </ul>
67+
* And something more
6768
*/
6869
static ERROR_TYPE = "";
6970

crates/weaver_forge/expected_output/comment_format/example.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
5757
- Use a domain-specific attribute
5858
- Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not
59+
60+
And something more
5961
"""
6062

6163
ATTR: Final = ""

crates/weaver_forge/expected_output/comment_format/example.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
///
5353
/// - Use a domain-specific attribute
5454
/// - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not
55+
///
56+
/// And something more
5557
const ERROR_TYPE: &str = "";
5658

5759

crates/weaver_forge/src/extensions/code.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,9 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
334334
it's RECOMMENDED to:
335335
336336
* Use a domain-specific attribute
337-
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.. "#;
337+
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not
338+
339+
And something more.. "#;
338340
let ctx = serde_json::json!({
339341
"note": note
340342
});
@@ -368,6 +370,7 @@ it's RECOMMENDED to:
368370
* <li>Use a domain-specific attribute
369371
* <li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not
370372
* </ul>
373+
* And something more
371374
*/"##
372375
);
373376

@@ -398,6 +401,7 @@ it's RECOMMENDED to:
398401
* <li>Use a domain-specific attribute
399402
* <li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not
400403
* </ul>
404+
* And something more
401405
*/"##
402406
);
403407

@@ -428,6 +432,7 @@ it's RECOMMENDED to:
428432
* <li>Use a domain-specific attribute
429433
* <li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not
430434
* </ul>
435+
* And something more
431436
*/"##
432437
);
433438

@@ -458,6 +463,7 @@ it's RECOMMENDED to:
458463
* <li>Use a domain-specific attribute
459464
* <li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not
460465
* </ul>
466+
* And something more
461467
*/"##
462468
);
463469

@@ -517,6 +523,7 @@ it's RECOMMENDED to:
517523
* are defined within the
518524
* domain-specific set or not
519525
* </ul>
526+
* And something more
520527
*/"##
521528
);
522529

crates/weaver_forge/src/formats/html.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,9 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
528528
it's RECOMMENDED to:
529529
530530
* Use a domain-specific attribute
531-
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not."##;
531+
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not
532+
533+
And something more."##;
532534
let html = renderer.render(markdown, "java", None)?;
533535
assert_string_eq!(
534536
&html,
@@ -550,9 +552,9 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
550552
it's RECOMMENDED to:
551553
<ul>
552554
<li>Use a domain-specific attribute
553-
<li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not.
555+
<li>Set {@code error.type} to capture all errors, regardless of whether they are defined within the domain-specific set or not
554556
</ul>
555-
"##
557+
And something more."##
556558
);
557559
Ok(())
558560
}
@@ -728,7 +730,9 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
728730
it's RECOMMENDED to:
729731
730732
* Use a domain-specific attribute
731-
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not."##;
733+
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not
734+
735+
And something more."##;
732736
let html = renderer.render(markdown, "java", None)?;
733737
assert_string_eq!(
734738
&html,
@@ -776,9 +780,9 @@ RECOMMENDED to:
776780
capture all errors,
777781
regardless of whether they
778782
are defined within the
779-
domain-specific set or not.
783+
domain-specific set or not
780784
</ul>
781-
"##
785+
And something more."##
782786
);
783787
Ok(())
784788
}

crates/weaver_forge/src/formats/markdown.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,9 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
628628
it's RECOMMENDED to:
629629
630630
* Use a domain-specific attribute
631-
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not."##;
631+
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not
632+
633+
And something more."##;
632634
let rendered_md = renderer.render(markdown, "go", None)?;
633635
assert_string_eq!(
634636
&rendered_md,
@@ -650,7 +652,10 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
650652
it's RECOMMENDED to:
651653
652654
- Use a domain-specific attribute
653-
- Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not."##
655+
- Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not
656+
657+
And something more.
658+
"##
654659
);
655660

656661
let config = WeaverConfig {
@@ -835,7 +840,9 @@ If a specific domain defines its own set of error identifiers (such as HTTP or g
835840
it's RECOMMENDED to:
836841
837842
* Use a domain-specific attribute
838-
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not."##;
843+
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not
844+
845+
And something more."##;
839846
let rendered_md = renderer.render(markdown, "go", None)?;
840847
assert_string_eq!(
841848
&rendered_md,
@@ -881,7 +888,10 @@ RECOMMENDED to:
881888
all errors, regardless of
882889
whether they are defined
883890
within the domain-specific
884-
set or not."##
891+
set or not
892+
893+
And something more.
894+
"##
885895
);
886896

887897
let config = WeaverConfig {

crates/weaver_resolver/data/registry-test-3-extends/expected-attribute-catalog.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"500"
2121
],
2222
"requirement_level": "recommended",
23-
"note": "The `error.type` SHOULD be predictable and SHOULD have low cardinality.\nInstrumentations SHOULD document the list of errors they report.\n\nThe cardinality of `error.type` within one instrumentation library SHOULD be low.\nTelemetry consumers that aggregate data from multiple instrumentation libraries and applications\nshould be prepared for `error.type` to have high cardinality at query time when no\nadditional filters are applied.\n\nIf the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.\n\nIf a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\nit's RECOMMENDED to:\n\n* Use a domain-specific attribute\n* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.",
23+
"note": "The `error.type` SHOULD be predictable and SHOULD have low cardinality.\nInstrumentations SHOULD document the list of errors they report.\n\nThe cardinality of `error.type` within one instrumentation library SHOULD be low.\nTelemetry consumers that aggregate data from multiple instrumentation libraries and applications\nshould be prepared for `error.type` to have high cardinality at query time when no\nadditional filters are applied.\n\nIf the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.\n\nIf a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\nit's RECOMMENDED to:\n\n* Use a domain-specific attribute\n* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not\n\nAnd something more.",
2424
"stability": "stable"
2525
},
2626
{
@@ -1203,7 +1203,7 @@
12031203
"requirement_level": {
12041204
"conditionally_required": "If and only if the messaging operation has failed."
12051205
},
1206-
"note": "The `error.type` SHOULD be predictable and SHOULD have low cardinality.\nInstrumentations SHOULD document the list of errors they report.\n\nThe cardinality of `error.type` within one instrumentation library SHOULD be low.\nTelemetry consumers that aggregate data from multiple instrumentation libraries and applications\nshould be prepared for `error.type` to have high cardinality at query time when no\nadditional filters are applied.\n\nIf the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.\n\nIf a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\nit's RECOMMENDED to:\n\n* Use a domain-specific attribute\n* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.",
1206+
"note": "The `error.type` SHOULD be predictable and SHOULD have low cardinality.\nInstrumentations SHOULD document the list of errors they report.\n\nThe cardinality of `error.type` within one instrumentation library SHOULD be low.\nTelemetry consumers that aggregate data from multiple instrumentation libraries and applications\nshould be prepared for `error.type` to have high cardinality at query time when no\nadditional filters are applied.\n\nIf the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.\n\nIf a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\nit's RECOMMENDED to:\n\n* Use a domain-specific attribute\n* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not\n\nAnd something more.",
12071207
"stability": "stable"
12081208
},
12091209
{

0 commit comments

Comments
 (0)