forked from WikiEducationFoundation/WikiEduDashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added instruction for configuring pre-commit hook into setup script
- Loading branch information
1 parent
956dbc4
commit 0671225
Showing
2 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# Notify that the pre-commit hook is running | ||
echo "Pre-commit hook is running..." | ||
echo "⚡ Pre-commit hook is running..." | ||
|
||
# Run Rubocop with parallel processing | ||
bundle exec rubocop --parallel | ||
|
||
# Check the status of Rubocop | ||
if [ $? -ne 0 ]; then | ||
echo "🔴 Linting failed! Please fix the offenses before committing." | ||
echo -e "🔴 Linting failed! Please fix the offenses before committing." | ||
echo "You can run 'bundle exec rubocop -a' to auto-correct the issues." | ||
exit 1 | ||
fi | ||
|
||
# Notify that there are no linting issues and the commit can proceed | ||
echo "✅ No linting issues found. Proceeding with commit.\n" | ||
echo -e "🟢 No linting issues found. Proceeding with commit.\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters