codeclimate-community / codeclimate-markdownlint

8 stars 3 forks source link

When an exception occurs, the engine hangs indefinitely #12

Closed maxjacobson closed 8 years ago

maxjacobson commented 8 years ago

When I stumbled on #11, it manifested as an engine timeout. After some digging, I realized that the engine is hanging on this line: https://github.com/jpignata/codeclimate-markdownlint/blob/6d5a36fda651eac99259d3f541115500c53ffc7c/lib/cc/engine/markdownlint.rb#L28

STDERR.print err.read

It seems like specifically err.read is a blocking operation.

If, however, I simply remove that whole line, the exception is still printed to stderr, and the engine doesn't hang.