Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions sphinx_needs/directives/needimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,13 @@ def run(self) -> Sequence[nodes.Node]:
except (OSError, json.JSONDecodeError) as e:
# TODO: Add exception handling
raise SphinxNeedsFileException(correct_need_import_path) from e

errors = check_needs_data(needs_import_list)
if errors.schema:
logger.info(
f"Schema validation errors detected in file {correct_need_import_path}:"
)
for error in errors.schema:
logger.info(f" {error.message} -> {'.'.join(error.path)}")
errors = check_needs_data(needs_import_list)
if errors.schema:
logger.info(
f"Schema validation errors detected in file {correct_need_import_path}:"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah actually correct_need_import_path is only available from the local file path if/esle branch, so this needs to now account for also pointing to the remote path

)
for error in errors.schema:
logger.info(f" {error.message} -> {'.'.join(error.path)}")

if version is None:
try:
Expand Down