presidentbeef/brakeman — pull request #148 by presidentbeef (2012-09-19 01:08:57+00:00)
Title: Add some OutputProcessor resilience

While this is kind of putting a bandaid on issues like #53, Brakeman should recover properly from errors while formatting code (especially since the error is already being rescued...)

Instead of `OutputProcessor#format` returning `nil` when an error occurs or a `Sexp` is empty, it will now return an empty string. That way when the result of the call is used (e.g. in [warnings](https://github.com/presidentbeef/brakeman/blob/master/lib/brakeman/warning.rb#L77)) it will be safe to expect a string.

Also, tests!
:joy_cat:

(While no one is probably wondering, `OutputProcessor#process_call` will likely be removed very soon in another pull request).