Skip to content

Spurious ignored lines of code #99

@niall-byrne

Description

@niall-byrne

I was playing around with the mark_multiline function in an attempt to remedy this, but I might need help from someone more familiar with ruby.

Currently bashcov isn't picking up subshell defined variables if they are spread accross multiple lines:

my_variable="$(
   cat /tmp/myfile.txt
)"

The line with cat is marked as missed.

Here's a contrived example:

Image

Is this because it's being executed in a subshell and there is some reason the line cannot be identified as executed? Or is simply a matter creating a more forgiving regex?

I'm unsure if this is a good candidate for the multi_line solution as there could be conditionals inside the subshell.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions