pfff is mainly an OCaml API to write static analysis, dynamic analysis, code visualizations, code navigations, or style-preserving source-to-source transformations such as refactorings on source code.
This is used by spacegrep, which will now be able to read from named pipes created with bash e.g.
$ spacegrep hello <(echo 'hello world')
Test plan for read_file:
make test
Tests for named pipes would be too complicated (involving a fork). For testing them, try semgrep-core -lang js -e x <(echo 'x'), which should return a match.
This PR also exposes the show_token_location function which is occasionally useful for debugging semgrep.
Security
[x] Change has no security implications (otherwise, ping the security team)
This is used by spacegrep, which will now be able to read from named pipes created with bash e.g.
Test plan for
read_file
:Tests for named pipes would be too complicated (involving a fork). For testing them, try
semgrep-core -lang js -e x <(echo 'x')
, which should return a match.This PR also exposes the
show_token_location
function which is occasionally useful for debugging semgrep.Security