Shorten module names in html report

Issue #116 closed
Ram Rachum created an issue

I have some long module names in my project.

This is making my html report too wide, which makes it hard to read in a browser because of horizontal scrolling:


I would like coverage to put a '...' in the middle of long modules' names in order to shorten them. Or any other reasonable way of shortening their names to make for an easy-to-read html report. Also note that this screenshot was taken on a 1280*1024 monitor; I want to be able to see coverage reports on smaller monitors too, if possible.

A few ideas: We can put the numbers to the left of the names. We could use a smaller font for the names.

Comments (2)

  1. Vitaly Bogomolov

    Maybe, something like this:

    path_prefix = /very/long/path/name
    if path_prefix and module_name.startswith(path_prefix):
        output_name = module_name[len(path_prefix):]

    path_prefix value can be shown once on the report page. both 'report' and 'html' commands can be a target.

  2. Log in to comment