You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
Yes, you're right. The bash-parser has never been any good, and should really be rewritten as a proper language parser. It's not something I've planned to do myself though.
There is a basic bash parser which can be used if the regular one goes astray. It has more false positives/negatives, but sometimes avoids getting totally lost instead. It can be used by kcov --configure=bash-use-basic-parser=1 [other arguments as before]. Not sure if that helps here.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
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:
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.
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.
The text was updated successfully, but these errors were encountered: