Skip to content

Commit 2998097

Browse files
committed
fix missing docstrings in module
1 parent deaa9e4 commit 2998097

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

analysis/src/DocExtraction.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ let rec stringifyDocItem ?(indentation = 0) ~originalEnv (item : docItem) =
156156
("id", Some (wrapInQuotes m.id));
157157
("name", Some (wrapInQuotes m.name));
158158
("kind", Some (wrapInQuotes "module"));
159+
("docstrings", Some (stringifyDocstrings m.docstring));
159160
( "items",
160161
Some
161162
(m.items

analysis/tests/src/expected/DocExtraction2.res.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ preferring found resi file for impl: src/DocExtraction2.resi
2424
"id": "DocExtraction2.InnerModule",
2525
"name": "InnerModule",
2626
"kind": "module",
27+
"docstrings": [],
2728
"items": [
2829
{
2930
"id": "DocExtraction2.InnerModule.t",

analysis/tests/src/expected/DocExtraction2.resi.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ extracting docs for src/DocExtraction2.resi
2323
"id": "DocExtraction2.InnerModule",
2424
"name": "InnerModule",
2525
"kind": "module",
26+
"docstrings": [],
2627
"items": [
2728
{
2829
"id": "DocExtraction2.InnerModule.t",

analysis/tests/src/expected/DocExtractionRes.res.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ extracting docs for src/DocExtractionRes.res
4545
"id": "DocExtractionRes.SomeInnerModule",
4646
"name": "SomeInnerModule",
4747
"kind": "module",
48+
"docstrings": ["Another module level docstring here."],
4849
"items": [
4950
{
5051
"id": "DocExtractionRes.SomeInnerModule.status",
@@ -92,6 +93,7 @@ extracting docs for src/DocExtractionRes.res
9293
"id": "DocExtractionRes.AnotherModule",
9394
"name": "AnotherModule",
9495
"kind": "module",
96+
"docstrings": ["Mighty fine module here too!"],
9597
"items": [
9698
{
9799
"id": "DocExtractionRes.LinkedModule",
@@ -154,6 +156,7 @@ extracting docs for src/DocExtractionRes.res
154156
"id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported",
155157
"name": "ModuleWithThingsThatShouldNotBeExported",
156158
"kind": "module",
159+
"docstrings": [],
157160
"items": [
158161
{
159162
"id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported.t",

0 commit comments

Comments
 (0)