ajaxorg/cloud9 — pull request #2277 by zefhemel (2012-10-05 07:13:21+00:00)
Title: [Liskov] Detect if(err) handlers without return.

Yesterday, as part of our run to fix a issue on c9.io, I found a bug that I've seen many times before: not returning in an error handler:

```
function helloAsync(callback) {
doSomethingElse(function(err) {
// Pass up error handling
if(err)
callback(err);

// more stuff
callback(null, "Hello!");
});
}
```

This is **wrong**. It will call the `callback` function twice, in case of error. So, this morning I decided to write a little treehugger snippet to warn about these types of mistakes.

This is it.

@ajaxorg/liskov (FYI @ajaxorg/knuth)