Skip to content

Commit 12faf0d

Browse files
authored
Merge pull request #2518 from strictdoc-project/stanislaw/fix_entire_file
fix(backend/sdoc_source_code): general reader: always set function marker to entire file
2 parents 425f2a0 + b00a7d1 commit 12faf0d

File tree

2 files changed

+4
-1
lines changed
  • strictdoc/backend/sdoc_source_code

2 files changed

+4
-1
lines changed

strictdoc/backend/sdoc_source_code/reader.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ def function_range_marker_processor(
220220
function_range_marker.ng_range_line_end = (
221221
parse_context.file_stats.lines_total
222222
)
223+
# Function range markers supported by this general reader can only
224+
# be of scope=file. Only the language-aware parsing results in
225+
# markers also having scope=function or scope=class.
226+
function_range_marker.set_description("entire file")
223227

224228
for req in function_range_marker.reqs:
225229
markers = parse_context.map_reqs_to_markers.setdefault(req, [])

tests/integration/features/source_code_traceability/_general/70_link_from_section_to_file/strictdoc.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
features = [
44
"REQUIREMENT_TO_SOURCE_TRACEABILITY",
5-
"SOURCE_FILE_LANGUAGE_PARSERS",
65
]
76

87
exclude_source_paths = [

0 commit comments

Comments
 (0)