pre-commit 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/pre-commit/checks/tabs.rb +4 -2
  2. metadata +2 -2
@@ -37,12 +37,14 @@ class Tabs
37
37
  end
38
38
  end
39
39
 
40
+ LEADING_TAB_PATTERN = '^ *\t'
41
+
40
42
  def detected_bad_code?
41
- system("grep -PnIH -q '^\t' #{staged_files}")
43
+ system("grep -PnIH -q '#{LEADING_TAB_PATTERN}' #{staged_files}")
42
44
  end
43
45
 
44
46
  def violations
45
- `grep -PnIH '^\t' #{staged_files}`
47
+ `grep -PnIH '#{LEADING_TAB_PATTERN}' #{staged_files}`
46
48
  end
47
49
 
48
50
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: pre-commit
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.15
5
+ version: 0.1.16
6
6
  platform: ruby
7
7
  authors:
8
8
  - Shajith Chacko, Josh Lubaway
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-10 00:00:00 Z
13
+ date: 2011-08-24 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: execjs