Skip to content

Instantly share code, notes, and snippets.

@timruffles
Created February 7, 2011 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timruffles/814748 to your computer and use it in GitHub Desktop.
Save timruffles/814748 to your computer and use it in GitHub Desktop.
saves you time
#!/usr/bin/ruby
js_path = 'public/javascripts'
problems = `grep -rP "\}[\s\n]*,[\s\n]*\}" #{js_path}`
if problems.length > 1
puts "Woops, Internet Explorer HATES it when you use too many commas. Fix this or you'll be sad:"
puts problems
exit 1
else
exit 0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment