Ban XXX, TBD, FIXME comments (#6486)

This commit is contained in:
Michael Vines
2019-10-21 16:43:11 -07:00
committed by GitHub
parent b38bf90de7
commit 3fb70b8d47
4 changed files with 27 additions and 5 deletions

View File

@ -44,3 +44,25 @@ fi
if _ git --no-pager grep -n 'Default::default()' -- '*.rs'; then
exit 1
fi
# Github Issues should be used to track outstanding work items instead of
# marking up the code
#
# Ref: https://github.com/solana-labs/solana/issues/6474
declare useGithubIssueInsteadOf=(
'XXX'
'TBD'
'FIXME'
#'TODO' # TODO: Uncomment this line to disable TODOs
)
if _ git --no-pager grep -n --max-depth=0 "${useGithubIssueInsteadOf[@]/#/-e }" -- '*.rs' '*.sh'; then
exit 1
fi
# TODO: Remove this `git grep` once TODOs are banned above
# (this command is only used to highlight the current offenders)
_ git --no-pager grep -n --max-depth=0 "-e TODO" -- '*.rs' '*.sh' || true
echo "^^^ +++"
# END TODO