doorstop icon indicating copy to clipboard operation
doorstop copied to clipboard

Provide a dictionary of issue types instead of a flat list

Open theovoss opened this issue 11 years ago • 3 comments

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 avatar May 02 '14 19:05 theovoss

@theovoss Can you show me a sample dictionary?

jacebrowning avatar May 02 '14 19:05 jacebrowning

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.

theovoss avatar May 02 '14 20:05 theovoss

I see this feature as requiring two separate changes:

  1. custom exception types that extend DoorstopError, DoorstopWarning, or DoorstopInfo
  2. an API to group issues by type

jacebrowning avatar May 02 '14 20:05 jacebrowning