Last active
August 29, 2015 14:04
-
-
Save lowjoel/2916e2fb61a2b2bcbcfe to your computer and use it in GitHub Desktop.
Revisions
-
lowjoel revised this gist
Jul 26, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ printer = lambda do |stream| stream.puts reporter.report end if file FileUtils.mkpath(File.dirname(file)) File.open(file, 'w') do |stream| printer.call(stream) end -
lowjoel revised this gist
Jul 26, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ printer = lambda do |stream| stream.puts reporter.report end if file FileUtils.mkpath(File.dirname(RUBOCOP_XML)) File.open(file, 'w') do |stream| printer.call(stream) end -
lowjoel renamed this gist
Jul 26, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
lowjoel created this gist
Jul 26, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ #!/usr/bin/env ruby # encoding: utf-8 require 'jshint' require 'jshint/reporters' reporter_name = ARGV[0] || :Default file = ARGV[1] linter = Jshint::Lint.new linter.lint reporter = Jshint::Reporters.const_get(reporter_name).new(linter.errors) printer = lambda do |stream| stream.puts reporter.report end if file Dir.mkdir(File.dirname(file)) File.open(file, 'w') do |stream| printer.call(stream) end else printer.call($stdout) end