| Q |
A |
| OS |
Linux (Cygwin on Windows) |
| Shell & version |
bash 5.2.21(1)-release |
| bashunit version |
0.34.1 |
Summary
Bashunit coverage calculation does not properly ignore all non-executable lines.
Current behavior
The following lines are counted as executable lines of code which should not be:
- Case statements with a comment afterward (e.g.:
*thing) # Looks for thing at end of text) - it looks like the grep pattern for case statements is simply missing a (#.*)? for comments
- Loop end with file redirection (e.g.:
done < /path/to/file, done <<<"$var", etc.)
How to reproduce
See above
Expected behavior
These lines should be omitted from executable lines of code
Summary
Bashunit coverage calculation does not properly ignore all non-executable lines.
Current behavior
The following lines are counted as executable lines of code which should not be:
*thing) # Looks for thing at end of text) - it looks like the grep pattern for case statements is simply missing a(#.*)?for commentsdone < /path/to/file,done <<<"$var", etc.)How to reproduce
See above
Expected behavior
These lines should be omitted from executable lines of code