buildingSMART / IDS-Audit-tool

Official buildingSMART tool to audit the validity of a .ids file (according to the full IDSxml standard).
MIT License
19 stars 8 forks source link

Reporting the element in error #6

Closed francescoaielloALMA closed 1 year ago

francescoaielloALMA commented 1 year ago

I would like to suggest improving the way errors are reported. The line in the ids file is not enough, but it would be useful to have the specific item in error. For example, if the library is used in software with a graphic interface, the line number is not enough to show the user the element in error (e.g. specification, applicability, requirement...).

CBenghi commented 1 year ago

Thanks @francescoaielloALMA,

Indeed this makes a lot of sense.

I forgot to close the issue when it was first solved it.

But for future reference, this is possible using the information provided by the logger, see relevant documentation.

For an example on how to use it, see the https://github.com/buildingSMART/IDS-Audit-tool/blob/ce816ee92b118dab89fc695efcfb8efeccc43dbe/ids-tool.tests/FeedbackTests.cs#L35 ILogger implementation.