SimonKagstrom / kcov

Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
http://simonkagstrom.github.io/kcov/
GNU General Public License v2.0
712 stars 109 forks source link

Include/exclude by shebang #!/usr/bin/bash #313

Open jclaveau opened 4 years ago

jclaveau commented 4 years ago

The current options --include-pattern / --exclude-pattern are based on the filename but some bash code can have no extension if having #!/usr/bin/bash as header.

Would it be possible to provide an option like --include-shebang / --exclude-shebang to achieve this?

Tack!

SimonKagstrom commented 4 years ago

Well, I guess it would be possible to add, but it would require parsing all files.

I think the same thing can be accomplished by passing

--bash-dont-parse-binary-dir

as well.

jclaveau commented 4 years ago

Good to know! Thanks for your fast answer