Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error reporting when attribute is not defined in configuration #320

Open
Letme opened this issue Nov 10, 2022 · 0 comments
Open
Assignees

Comments

@Letme
Copy link
Member

Letme commented Nov 10, 2022

When you use item attribute that is not defined in configuration, extension produces ERROR, but that also means that item is not created so any other items linking to the item with the wrong attribute will produce a usual warning. That is a lot of warnings to hide in the real cause (might be cool to add also advice to add attribute (option) to traceability_configuration).

So lets say item A has unconfigured attribute test and item B linking to it, then you get the following errors&warnings:

ERROR: Error in "item" directive:
unknown option: "test".
.. item A:: 
    :test: something
WARNING: Item 'A' has no reference to source document.
WARNING: Traceability: cannot link to 'A', item is not defined

In reality, you should only get the error (and not warnings afterwards). Maybe that means we need to change ERROR into WARNING for unknown option? And lets add suggestion to add attribute to configuration, just to make it more descriptive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants