Skip to content

Improve public API #66

@doublep

Description

@doublep

Currently, undercover is very difficult to use from other tools, as it provides very few public functions, largely tailored to "the standard way of running".

Based on Eldev integration code, which currently often has to dive into internals, I can suggest/request the following improvements:

  • Don't require to go through undercover macro. Currently it largely looks like

    (defun im-the-only-entry-point ()
      (step-1)
      (step-2)
      (step-3))
    

    instead, make all the step-# functions public and let users just call them in the correct order, easily preprocessing arguments or postprocessing results, calling whatever inbetween and so on.

  • Instead or in addition to passing configuration through undercover--set-options, make the variables it sets, like undercover--report-file-path, public.

  • Allow callers to specify file lists, don't insist on processing wildcards in it.

  • Don't call undercover-report-on-kill automatically. Instead, let the caller to generate report when he wants.

  • Expose the default value of undercover--report-file-path somehow. Since 0.8 it is practically impossible to dig it out of the library. Maybe just add a function that returns it.

  • Clean up, document and expose a way to merge reports vs. saving new. Currently, the only way to start from scratch seems to be manually deleting report file, which is further complicated by inability to find the name (previous point). Starting from scratch seems to be "the sane" option for local reports, while about merging I'm not even sure when it is useful.

Naturally, there can and should be way to work "as now", probably implemented as simple helpers over more common API outlined above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions