Skip to content

List all custom assertions in submodule readme#325

Merged
atilaneves merged 1 commit intoatilaneves:masterfrom
Inkrementator:list_all_assertions
Mar 4, 2026
Merged

List all custom assertions in submodule readme#325
atilaneves merged 1 commit intoatilaneves:masterfrom
Inkrementator:list_all_assertions

Conversation

@Inkrementator
Copy link
Contributor

This allows you to click on the sub-package on code.dlang.org and get a list. This is something have now done a few times (instinctively, the affordance is definitely there for it) but I never found anything and had to go source diving for the functions.

Extracted with the following commands from the git root dir:

PATTERN='^\s*(?:[A-Za-z_@()\s]*\s)?(?:auto|void)\s+(should[A-Z][A-Za-z_0-9]*)'
FILE=subpackages/assertions/source/unit_threaded/assertions.d
rg -P --no-line-number --only-matching --replace '$1' "$PATTERN" "$FILE" \
	| awk '!seen[$0]++' \
	| sed 's/^/- /'

This allows you to click on the sub-package on code.dlang.org and get a
list. This is something have now done a few times (instinctively, the
affordance is definitely there for it) but I never found anything and
had to go source diving for the functions.

Extracted with the following commands from the git root dir:
```
PATTERN='^\s*(?:[A-Za-z_@()\s]*\s)?(?:auto|void)\s+(should[A-Z][A-Za-z_0-9]*)'
FILE=subpackages/assertions/source/unit_threaded/assertions.d
rg -P --no-line-number --only-matching --replace '$1' "$PATTERN" "$FILE" \
	| awk '!seen[$0]++' \
	| sed 's/^/- /'
```
@atilaneves atilaneves merged commit 313bf25 into atilaneves:master Mar 4, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants