sourcecred/scripts/ensure-flow.sh
Dandelion Mané 93e2798f37
Ensure that flow is used in all js files (#232)
This script ensures that either //@flow or //@no-flow is present in
every js file. Every existing js file that would fail this check has
been given //@no-flow, we should work to remove all of these in the
future.

Test plan:
I verified that `yarn travis` fails before fixing the other js files,
and passes afterwards.
2018-05-07 20:02:19 -07:00

8 lines
201 B
Bash
Executable File

#!/bin/bash
set -eu
comm -13 -z \
<(git grep -z --name-only -e @flow -e @no-flow | sort -z) \
<(find src config scripts -name '*.js' -print0 | sort -z) \
| tr '\0' '\n' \
| diff -u /dev/null -