Python text IO is counting by number of character
and not by number of bytes.
However, we were asking to read a number of bytes
and not a number of character,
leading to strange I/O exceptions being raised.
They are not stable and are changing with SPARQL 1.2.
Let's avoid the hassle of maintaining them.
We got the rule name to quickly match the code with the grammar.
That is to overcome warnings from shellcheck
In .clusterfuzzlite/build.sh line 8:
hash=($(sha256sum "$file"))
^------------------^ SC2207 (warning): Prefer mapfile or read -a to split command output (or quote to avoid splitting).
In .clusterfuzzlite/build.sh line 9:
cp "$file" "/tmp/oxigraph_$1/$hash"
^---^ SC2128 (warning): Expanding an array without an index only gives the first element.
although original code is making a cute use of an array, if we are to follow
shellcheck and use mapfile or read -a - and then use explicit index -- makes it
just too cumbersome. IMHO explicit awk would be easier to read etc.
e.g. if one command fails or undefined variable is used.
In turn it would allow to address such codeshell warnings like
In bench/bsbm_graphdb.sh line 7:
cd bsbm-tools
^-----------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
Did you mean:
cd bsbm-tools || exit
but note that there are uses left like
❯ git grep 'cd bsbm-tools || exit'
bench/bsbm_blazegraph.sh:cd bsbm-tools || exit
bench/bsbm_jena.sh:cd bsbm-tools || exit
bench/bsbm_rdf4j.sh:cd bsbm-tools || exit
but may be `|| exit` should be removed and they should exit with error? or the
same should be added to the other 3?
❯ git grep 'cd bsbm-tools$'
bench/bsbm_graphdb.sh:cd bsbm-tools
bench/bsbm_oxigraph.sh:cd bsbm-tools
bench/bsbm_virtuoso.sh:cd bsbm-tools