wultra / docucheck

Tool for validating Wultra's documentation
Apache License 2.0
2 stars 2 forks source link

Wrong line number reported in error #61

Open hvge opened 3 years ago

hvge commented 3 years ago

If there are more filters applied to the same document, then the line number reported in error (or warning) may be wrong. This is due to fact that docucheck applies filters in predefined order, so if the first filter does significant modification to the file, then the error reported from 2nd filter may have wrong line number. This is problematic especially for a very long documents, where the difference may be typically in hundreds of lines, so the reported error has no practical value.

The fix may be relatively simple. Each line in docucheck's model has it's own unique identifier preserved during the all document manipulations, so what we need is to keep an initial dictionary that will map line-identifier into original line number.

Related to #59