forked from textmate/ruby.tmbundle
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCheck Ruby Syntax.plist
More file actions
40 lines (38 loc) · 1.05 KB
/
Check Ruby Syntax.plist
File metadata and controls
40 lines (38 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/usr/bin/env ruby18
require "shellwords"
require ENV['TM_SUPPORT_PATH'] + '/lib/textmate'
puts `"${TM_RUBY:=ruby}" -e'puts "Using ruby-" + RUBY_VERSION.to_s'`
puts result = `"${TM_RUBY:=ruby}" -wc 2>&1`
if result =~ /-:(\d+):(.*)/
TextMate.go_to :line => $1
`"$TM_MATE" -c warning`
result.each_line do |line|
if line =~ /-:(\d+):(.*)/
`"$TM_MATE" --set-mark warning:#{Shellwords.escape($2)} --line #{$1}`
end
end
else
`"$TM_MATE" -c warning`
end
</string>
<key>input</key>
<string>document</string>
<key>keyEquivalent</key>
<string>^V</string>
<key>name</key>
<string>Validate Syntax</string>
<key>output</key>
<string>showAsTooltip</string>
<key>scope</key>
<string>source.ruby</string>
<key>uuid</key>
<string>EE5F19BA-6C02-11D9-92BA-0011242E4184</string>
</dict>
</plist>