1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-08-28 23:36:17 +03:00
Files
telegram-bot/bin/git-hooks/pre-commit
Max Melentiev 37a63f7b23 v0.1.0
2016-02-22 23:19:38 +06:00

15 строки
268 B
Bash
Исполняемый файл

#!/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