-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backend/sdoc_source_code: general source code reader: support scope=file
- Loading branch information
Showing
9 changed files
with
93 additions
and
4 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
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
9 changes: 9 additions & 0 deletions
9
tests/integration/features/file_traceability/55_file_marker/file.py
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,9 @@ | ||
""" | ||
@relation(REQ-001, scope=file) | ||
""" | ||
|
||
def hello_world(): | ||
# @sdoc[REQ-001] | ||
print("ignored hello world") # noqa: T201 | ||
print("ignored hello world") # noqa: T201 | ||
# @sdoc[/REQ-001] |
7 changes: 7 additions & 0 deletions
7
tests/integration/features/file_traceability/55_file_marker/input.sdoc
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,7 @@ | ||
[DOCUMENT] | ||
TITLE: Hello world doc | ||
|
||
[REQUIREMENT] | ||
UID: REQ-001 | ||
TITLE: Requirement Title | ||
STATEMENT: Requirement Statement |
5 changes: 5 additions & 0 deletions
5
tests/integration/features/file_traceability/55_file_marker/strictdoc.toml
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,5 @@ | ||
[project] | ||
|
||
features = [ | ||
"REQUIREMENT_TO_SOURCE_TRACEABILITY", | ||
] |
8 changes: 8 additions & 0 deletions
8
tests/integration/features/file_traceability/55_file_marker/test.itest
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,8 @@ | ||
RUN: %strictdoc export %S --output-dir Output | filecheck %s --dump-input=fail | ||
CHECK: Published: Hello world doc | ||
|
||
RUN: %check_exists --file "%S/Output/html/_source_files/file.py.html" | ||
|
||
RUN: %cat %S/Output/html/_source_files/file.py.html | filecheck %s --dump-input=fail --check-prefix CHECK-SOURCE-FILE | ||
CHECK-SOURCE-FILE: [ 1-9 ] | ||
CHECK-SOURCE-FILE: [ 6-9 ] |
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