linux-test-project / lcov

LCOV
GNU General Public License v2.0
867 stars 235 forks source link

lcovrc param "geninfo_adjust_src_path" results in "geninfo: ERROR: invalid 'subst' regexp" #253

Closed kschwab closed 7 months ago

kschwab commented 7 months ago

Hello,

When using the lcovrc parameter geninfo_adjust_src_path it results in error:

geninfo: ERROR: invalid 'subst' regexp '(?^:s#\$pattern#\$replace#g)': syntax error at (eval 317) line 1, near "(?"

The same error is produced if geninfo_adjust_src_path is set in the lcovrc file. However, using lcovrc parameter substitute does work.

Failing geninfo_adjust_src_path example:

lcov -c -d . --rc geninfo_adjust_src_path="/tmp/build => /usr/src"
:
geninfo: ERROR: invalid 'subst' regexp '(?^:s#\$pattern#\$replace#g)': syntax error at (eval 317) line 1, near "(?"
echo $?
1

Passing substitute example:

lcov -c -d . --substitute="s#/tmp/build#/usr/src#g"
echo $?
0