RFE: Make annotate API return list or string and add --stdout option

Issue #393 closed
Alexander Todorov created an issue

Filing here for consideration and comments. I can provide a patch if necessary.

1) Make the annotate API return either a list of annotated lines or the whole thing as a string so it can be used in 3rd party programs. I'm using the annotated string for my coverage-diff tool and currently had to copy and rewrite some of the AnnotateReporter methods.

2) Add a --stdout option (or better yet make it a default) so that annotate prints to the console.

Comments (3)

  1. Ned Batchelder repo owner

    The annotation machinery is all designed to work on the entire project at once, creating a number of files. I'm not sure what code you want to change to return a string. Can you provide more details about exactly how you'd like it to work?

    PS: annotate is one of my least favorite things in coverage.py...

  2. Log in to comment