legendary.nvim icon indicating copy to clipboard operation
legendary.nvim copied to clipboard

[Tooling]: Add a linting rule to disallow `print` statements

Open mrjones2014 opened this issue 1 year ago • 0 comments

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

mrjones2014 avatar Aug 24 '22 10:08 mrjones2014