PanDAWMS/dkb

Travis README checks fail to process lines with special symbols.

Closed this issue · 1 comments

When changed line in README contains some special regex symbols, grep treats them accordingly and may fail, e.g. like in this case (https://travis-ci.com/github/PanDAWMS/dkb/jobs/302545746):

$ cd PanDAWMS/dkb
$ git checkout -qf 4dcfd7395a812ff09d93ef94fab2069f84b45f28
$ bash -c 'echo $BASH_VERSION'
4.3.48(1)-release
$ Tests/travis/README_long_lines.sh
Very long line(s) in Utils/Dataflow/009_oracleConnector/README:
grep: Invalid range end
The command "Tests/travis/README_long_lines.sh" exited with 1.

Changed line looked like this:

  sample2020.ndjson - collected with timestamps [01-03-2020 12:00:00, 01-03-2020 14:00:00]

-- so grep in getLinesFromFile function stumbled over [...] with something strange inside (but if there was less strange combination, it might simply fail to find the line of interest).

Perhaps the line of interest must be escaped somehow -- or maybe grep itself knows how to ignore special symbols and it may be used, but I didn't look into it too carefully.