-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
args: omit all lamda args. To force explizit documentation of them.
- Loading branch information
Showing
8 changed files
with
237 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/snapshots/nixdoc__test__doc_comment_no_duplicate_arguments.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
source: src/test.rs | ||
expression: output | ||
--- | ||
# Debug {#sec-functions-library-debug} | ||
|
||
|
||
## `lib.debug.old` {#function-library-lib.debug.old} | ||
|
||
nixdoc comment | ||
|
||
`arg` | ||
|
||
: Should be visible | ||
|
||
|
||
## `lib.debug.omited` {#function-library-lib.debug.omited} | ||
|
||
Doc-comment | ||
|
||
## `lib.debug.multiple` {#function-library-lib.debug.multiple} | ||
|
||
Doc-comment | ||
|
||
## `lib.debug.argumentTest` {#function-library-lib.debug.argumentTest} | ||
|
||
Doc-comment before the lamdba causes the whole | ||
lambda including its arguments to switch to doc-comments ONLY rendering | ||
|
||
## `lib.debug.legacyArgumentTest` {#function-library-lib.debug.legacyArgumentTest} | ||
|
||
Legacy comments allow to use any | ||
form of comments for the lambda arguments/formals | ||
|
||
structured function argument | ||
|
||
: `formal1` | ||
|
||
: Legacy line comment | ||
|
||
`formal2` | ||
|
||
: Legacy Block | ||
|
||
`formal3` | ||
|
||
: Legacy | ||
multiline | ||
comment | ||
|
||
`formal4` | ||
|
||
: doc-comment style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
/** Doc comment*/ | ||
foo = | ||
# Ignored | ||
bar: | ||
bar; | ||
|
||
/** | ||
doc comment in markdown format | ||
Causes the whole function to use RFC145 conform rendering | ||
*/ | ||
argumentTest = | ||
{ | ||
# Not documented | ||
formal1, | ||
formal2, | ||
/* Not documented */ | ||
formal3, | ||
/** | ||
Documented | ||
*/ | ||
formal4, | ||
}: | ||
{}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
/* nixdoc comment */ | ||
old = | ||
# Should be visible | ||
arg: 1; | ||
|
||
/** Doc-comment */ | ||
omited = | ||
# Not visible | ||
arg: 1; | ||
|
||
/** Doc-comment */ | ||
multiple = | ||
# Not visible | ||
arg: | ||
/* Not visible */ | ||
foo: | ||
/** Not visible */ | ||
bar: | ||
1; | ||
|
||
/** | ||
Doc-comment before the lamdba causes the whole | ||
lambda including its arguments to switch to doc-comments ONLY rendering | ||
*/ | ||
argumentTest = { | ||
# Legacy line comment | ||
formal1, | ||
# Legacy | ||
# Block | ||
formal2, | ||
/* | ||
Legacy | ||
multiline | ||
comment | ||
*/ | ||
formal3, | ||
/** | ||
Not shown yet | ||
*/ | ||
formal4, | ||
|
||
}: | ||
{}; | ||
|
||
/* | ||
Legacy comments allow to use any | ||
form of comments for the lambda arguments/formals | ||
*/ | ||
legacyArgumentTest = { | ||
# Legacy line comment | ||
formal1, | ||
# Legacy | ||
# Block | ||
formal2, | ||
/* | ||
Legacy | ||
multiline | ||
comment | ||
*/ | ||
formal3, | ||
/** | ||
doc-comment style | ||
*/ | ||
formal4, | ||
|
||
}: | ||
{}; | ||
} |
Oops, something went wrong.