Provide a dictionary of issue types instead of a flat list
So when I'm working on fixing issues that doorstop shows, I want to work on one type at a time and to know roughly how many places that issue type exist.
For example, currently I don't care about any tracing to the design document, so I've done some basic text filtering to ignore that.
It'd be nice to be able to have a dictionary of issues and save each key as a different file so I can go through and fix one type of issue at a time.
Key = issue type Value = sub-section of the current tree.issues list that corresponds to the key's issue type
Perhaps keep the current functionality as well.
@theovoss Can you show me a sample dictionary?
issue_dict = tree.get_issue_dict()
tree.get_issue_dict would return something along the lines of:
{
"no_text":[all_items_with_no_text],
"no_links_to_parent":[all_items_without_links_to_parent_doc],
"non_normative_has_links":[all_non_normative_items_with_links]
}
And I would go:
for issue_type in issue_dict.keys:
f=open("<some_root_path>/issues/"+issue_type)
for issue in issue_dict[issue_type]:
f.writeline(issue)
That would tell me how many types of issues I have, a short description of it, and then I could decide which ones I want to go fix first.
I see this feature as requiring two separate changes:
- custom exception types that extend
DoorstopError,DoorstopWarning, orDoorstopInfo - an API to group issues by type