Skip to content

Need a way to query if a line has a tag in the instrumentation API #67

@chrisseaton

Description

@chrisseaton

Ruby has a built-in coverage tool. It returns an array of values for each file, one value per line. If that line had code on it but wasn't executed the value is 0. If it didn't have any code on it anyway then the value is nil. I'm not sure how to recreate this distinction between no-code and never-executed in the new instrumentation API.

I'm thinking that one solution is to be able to run a query something like this:

boolean hasCode = instrumenter.doesExist(SourceSectionFilter.newBuilder()
    .sourceIs(source).lineIs(line).tagIs(LINE_TAG).build())

But I am of course open to any other idea that achieves the same result. I've got tests that fail until I can solve this.

I know that laziness makes it a tricky problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions