From 53d157fb719b931578360174aab1ee26697bff41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Wed, 2 Oct 2013 15:23:09 +0200 Subject: [PATCH 1/2] Don't check syntax if the file starts with a "no-verify" comment --- Commands/Validate and Save.tmCommand | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Commands/Validate and Save.tmCommand b/Commands/Validate and Save.tmCommand index 8dd46ba..13339ae 100644 --- a/Commands/Validate and Save.tmCommand +++ b/Commands/Validate and Save.tmCommand @@ -9,6 +9,8 @@ require ENV['TM_SUPPORT_PATH'] + '/lib/textmate' +exit if STDIN.readline =~ /\A#\W?no-?verify/i + compiler_ruby = `which rbx`.strip if compiler_ruby.length == 0 compiler_ruby = ENV['TM_RUBY'] || `which ruby`.strip From 62bdd525bd09adad6c551ba409ca321a342eeb9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Wed, 2 Oct 2013 15:23:40 +0200 Subject: [PATCH 2/2] Print the ruby version when verifying syntax --- Commands/Validate and Save.tmCommand | 1 + 1 file changed, 1 insertion(+) diff --git a/Commands/Validate and Save.tmCommand b/Commands/Validate and Save.tmCommand index 13339ae..443ee98 100644 --- a/Commands/Validate and Save.tmCommand +++ b/Commands/Validate and Save.tmCommand @@ -29,6 +29,7 @@ if scopes.include? 'source.ruby.rspec.cucumber.steps' end if result =~ /:(\d+):/ + puts `#{compiler_ruby} -v` print result TextMate.go_to :line => $1 end