by adrianomartins on 10/17/22, 11:22 AM with 19 comments
by craigds on 10/17/22, 9:09 PM
Their docs and website try very hard to suggest you should use it for some kind of CI process, but so far I haven't found any need to do so. I can maybe see it being useful in a pre-commit hook.
It's VERY handy for semantic searches though - in situations where ripgrep would be useless due to multi-line matches.
I set up this alias to make it a bit less verbose for Python patterns:
pygrep () {
pat="$1"
shift
filez="$*"
bash -xc "semgrep --lang=python --pattern '$pat' $filez"
}
Usage is something like: pygrep 'myfunc(..., needle_arg=..., ...)'
by koyanisqatsi on 10/18/22, 2:57 AM
by renewiltord on 10/17/22, 11:31 PM