зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-09-03 09:46:17 +03:00
v0.1.0
Этот коммит содержится в:
14
bin/git-hooks/pre-commit
Исполняемый файл
14
bin/git-hooks/pre-commit
Исполняемый файл
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
pattern=$(echo -n '\.rb
|
||||
\.gemspec
|
||||
\.jbuilder
|
||||
\.rake
|
||||
config\.ru
|
||||
Gemfile
|
||||
Rakefile' | tr "\\n" '|')
|
||||
|
||||
files=`git diff --cached --name-status | grep -E "^[AM].*($pattern)$" | cut -f2-`
|
||||
if [ -n "$files" ]; then
|
||||
bundle exec rubocop $files --force-exclusion
|
||||
fi
|
||||
Ссылка в новой задаче
Block a user