Skip to content

Instantly share code, notes, and snippets.

@palkan
Last active August 29, 2015 14:24
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 palkan/c1a08ac2b4f141ab00cd to your computer and use it in GitHub Desktop.
Save palkan/c1a08ac2b4f141ab00cd to your computer and use it in GitHub Desktop.
Rubocop bug report
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rubocop', github: 'bbatsov/rubocop'
GEMFILE
system 'bundle'
end
require 'bundler'
Bundler.setup(:default)
class Test # :nodoc:
def buggy
@events = Event.where('end_date > ?', DateTime.now).order(:start_date)
end
end
# This should print "Do not use DateTime.now without zone. Use Time.zone.now instead."
system 'bundle exec rubocop -R'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment