Skip to content

echo "<< EOF" causes rest of file to be ignored #472

@TexasDex

Description

@TexasDex

Yes I know it's a bit strange, but there's a good reason for a line like that: When run in debug mode, my script will output the command, args, and heredoc input to stdout, instead of running the command. The user can then copy/paste the command to run it independently.

However, when kcov processes my script it stops at the line in the title.

This can be duplicated with the following toy shell script:

#!/bin/bash

echo "Yes"
if true; then
	echo 1
fi
echo "<< EOF"
echo "What about this line?"
echo "Nope"

The last two lines will run and output when executing the shell script, when run inside of kcov or outside. However, the kcov results will not show the last two lines as green or red.

kcov_bug

When I comment out the line it works just fine.

I assume something in kcov is detecting heredocs and ignoring them, but that detection is overzealous and the line results in a false positive.

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