mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-08 21:34:25 +00:00
chore(lefthook): detect unwanted data
This commit is contained in:
5
snippets/grep.fish
Normal file
5
snippets/grep.fish
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env fish
|
||||
|
||||
# Check unwanted data
|
||||
# Show file name and line number
|
||||
! grep -EHinr -e 'some' -e 'regexp' * || ( echo 'unwanted data found' >&2 && false )
|
||||
7
snippets/lefthook.yml
Normal file
7
snippets/lefthook.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
pre-commit:
|
||||
commands:
|
||||
check-unwanted-data:
|
||||
run: >-
|
||||
! ( grep -Hin -e 'example.org' -e '012345678901' {staged_files} )
|
||||
|| ( printf %b '\n' 'found possibly unwanted data' >&2 && false )
|
||||
Reference in New Issue
Block a user