8 ms·
Ratchets in Software Development
- pdimitar 5y agoI wonder if OP uses comby.dev. I'm looking forward to integrating it in pre-commit hooks and CI to make sure certain code isn't allowed. I would use SemGrep if it supported Elixir. But it does support Rust so I'll use it there.
- aozgaa 5y ago#!/bin/bash Min=$1 Max=$2 Expression=$3 Count=$(grep -rP “$Expression” src | wc -l) if [ $Count -lt $Min ] ; then echo “too few” ; exit 1 ; fi If [ $Count -gt $Max ] ; then echo “too many” ; exit 1 ; fi