-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bash: heredoc and arrays are not correctly covered #457
Comments
Thanks for the clear test! This, and other bash parsing issues, should really be handled by #145 , but I don't really have any timeframe for that. I mostly (almost only) use kcov for compiled code myself, so the bash support is sort of neglected by me. |
See-also: SimonKagstrom#457 Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]>
See-also: SimonKagstrom#457 Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]>
See-also: SimonKagstrom#457 Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]>
With the last commit wich updates how subshells are parsed, the behavior (minor change) of kcov has changed; indeed, in order to skip the ')' for subshell functions, subshells, in general, does not have their ')' hit anymore. See-also: a750d47 See-also: SimonKagstrom#457 Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]>
With the last commit wich updates how subshells are parsed, the behavior (minor change) of kcov has changed; indeed, in order to skip the ')' for subshell functions, subshells, in general, does not have their ')' hit anymore. See-also: a750d47 See-also: SimonKagstrom#457 Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]>
See-also: SimonKagstrom#457 Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]>
See-also: SimonKagstrom#457 Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]>
With the last commit wich updates how subshells are parsed, the behavior (minor change) of kcov has changed; indeed, in order to skip the ')' for subshell functions, subshells, in general, does not have their ')' hit anymore. See-also: a750d47 See-also: SimonKagstrom#457 Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]>
See-also: a750d47 See-also: a03bf8d See-also: SimonKagstrom#457 Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]>
Currently, the following has been fixed (it's not perfect and other issues risk to occur):
|
Thanks a lot for these! I'm closing this issue. Another note is that there is also a basic parser for bash scripts, which can be used if the default parser goes astray, so I'm not to worried about additional issues. |
This reverts commit 7baa1a5. Indeed, the changes added by this previous commit were due to a bug in kcov which is now fixed. See-also: SimonKagstrom/kcov#459 See-also: SimonKagstrom/kcov#457 Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]>
Description
In bash, if a heredoc has space between the tag and
<<[-]
, the lines of the string are not covered.Same thing with arrays if they are not defined oneline.
It occurs also with functions in subshells like:
Example
The text was updated successfully, but these errors were encountered: