pre-commit 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/pre-commit/checks.rb
CHANGED
@@ -65,7 +65,7 @@ class PreCommit
|
|
65
65
|
checks_to_run = `git config pre-commit.checks`.chomp.split(/,\s*/).map(&:to_sym)
|
66
66
|
|
67
67
|
if checks_to_run.empty?
|
68
|
-
Checks.values_at(:white_space, :console_log, :debugger, :tabs, :
|
68
|
+
Checks.values_at(:white_space, :console_log, :debugger, :tabs, :js_lint_new)
|
69
69
|
else
|
70
70
|
Checks.values_at(*checks_to_run)
|
71
71
|
end.compact
|
@@ -25,11 +25,11 @@ class ConsoleLog
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def detected_bad_code?
|
28
|
-
system("grep -
|
28
|
+
system("grep -qe \"console\\.log\" #{staged_files}")
|
29
29
|
end
|
30
30
|
|
31
31
|
def instances_of_console_log_violations
|
32
|
-
`grep -
|
32
|
+
`grep -nHe \"console\\.log\" #{staged_files}`
|
33
33
|
end
|
34
34
|
|
35
35
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 5
|
9
|
+
version: 0.1.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Shajith Chacko, Josh Lubaway
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-02-
|
17
|
+
date: 2011-02-28 00:00:00 -08:00
|
18
18
|
default_executable: pre-commit
|
19
19
|
dependencies: []
|
20
20
|
|