Skip to content

Commit

Permalink
chore: prepush hook (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: tris203 <[email protected]>
  • Loading branch information
tris203 and tris203 authored Dec 17, 2023
1 parent 02cac34 commit 5bd3e1a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .githooks/pre-push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
#
# This hook is called by 'git push' and can be used to prevent a push from taking place.
#

# Stylua check
stylua --check lua/ --config-path ./.stylua.toml || exit 1
echo "Stylua check passed"

# Luacheck
luacheck lua/ --globals vim || exit 1
echo "Luacheck passed"

# Echo success
echo "Pre-push checks passed"
exit 0

2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup
run: |
sudo apt-get update
sudo apt-get install luarocks
sudo apt-get install luarocks -y
sudo luarocks install luacheck
- name: Lint
Expand Down

0 comments on commit 5bd3e1a

Please sign in to comment.