TE
科技回声
首页
24小时热榜
最新
最佳
问答
展示
工作
中文
GitHub
Twitter
首页
Ratchets in Software Development
23 点
作者
wyrm
超过 3 年前
2 条评论
aozgaa
超过 3 年前
#!/bin/bash<p>Min=$1<p>Max=$2<p>Expression=$3<p>Count=$(grep -rP “$Expression” src | wc -l)<p>if [ $Count -lt $Min ] ; then echo “too few” ; exit 1 ; fi<p>If [ $Count -gt $Max ] ; then echo “too many” ; exit 1 ; fi
pdimitar
超过 3 年前
I 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.<p>I would use SemGrep if it supported Elixir. But it does support Rust so I'll use it there.