class Rufo::Command

def format_stdin

def format_stdin
  code = STDIN.read
  result = format(code, @filename_for_dot_rufo || Dir.getwd)
  if @want_check
    exit 1 if result != code
  else
    print result
  end
rescue Rufo::SyntaxError
  STDERR.puts "Error: the given text is not a valid ruby program (it has syntax errors)"
  exit 1
rescue => ex
  STDERR.puts "You've found a bug!"
  STDERR.puts "Please report it to https://github.com/asterite/rufo/issues with code that triggers it"
  STDERR.puts
  raise ex
end