Skip to content

Instantly share code, notes, and snippets.

@nekketsuuu
Created May 28, 2018 16:57
Show Gist options
  • Save nekketsuuu/6ed89cdce03bae1238227a6a3a357d07 to your computer and use it in GitHub Desktop.
Save nekketsuuu/6ed89cdce03bae1238227a6a3a357d07 to your computer and use it in GitHub Desktop.
Check if all OCaml files have no errors under current .merlin file
#!/bin/bash
shopt -s globstar
for ml in ./src/**/*.ml; do
out="$(ocamlmerlin single errors -filename "$ml" < "$ml")" ;
echo "$ml" ;
if ! echo "$out" | grep -i '"value":\[\]' >/dev/null ; then
echo "$out" ;
fi ;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment