Skip to content

Commit

Permalink
added hooks for shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-1004 committed Jul 19, 2023
1 parent 2f3f3e4 commit dc391f6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".

if ! shellcheck -S error NfsDiagnostics/nfsclientlogs.sh SMBDiagnostics/smbclientlogs.sh
then
echo "Shellcheck failed"
exit 1
fi
1 change: 1 addition & 0 deletions enable-hooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Run this command in repo's root directory to enable local validations: `git config core.hooksPath .githooks`

0 comments on commit dc391f6

Please sign in to comment.