New Rule to valdiate references to local files
This Pull Request introduces a new plugin/rule that validates all local references. The plugin checks if the referenced file exists and also verifies that if the reference includes an anchor pointing to a scanned Markdown file, the corresponding heading exists as well. This ensures the integrity of the references and improves the overall quality of the documentation.
I have assigned the next available Rule Number for this plugin.
To validate anchors, the plugin scans both the Markdown file containing the reference and the Markdown file containing the heading. Currently, the report for each file is printed immediately after scanning it, resulting in an unsorted list of reports.
To address this, I propose printing all failure reports after scanning all the files. This approach will provide a consolidated and sorted view of the reports, making it easier to identify and address any issues in a more organized manner.
Reasoning
Ensuring Correctness
Invalid URLs for links and images can be a significant issue in documentation. Manually validating each link and image is a time-consuming task. With this rule, you can automatically validate the references to various parts of the documentation, such as links and images.
This helps to ensure the correctness and integrity of the documentation by identifying and flagging any invalid or broken references.