legendary.nvim
legendary.nvim copied to clipboard
[Tooling]: Add a linting rule to disallow `print` statements
Similar Issues
- [X] Before filing, I have searched for similar issues.
Description
It doesn't look like this is possible, but I wonder if we can implement it ourselves somehow. We can possibly use ripgrep
, but we'd need to figure out how to install it in GitHub Actions.
A little script like below should do the trick (pseudo-code):
cd teal
rg "^print\(.*\)\$" # the output here will also be printed
if [[ "$?" = "0" ]]; then # if rg exited with 0, it means we DID find matches
echo "ERROR: \`print\` statements are not allowed!"
exit 1
fi