codeclimate-community/codeclimate-markdownlint

When an exception occurs, the engine hangs indefinitely

maxjacobson opened this issue · 0 comments

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.