gap icon indicating copy to clipboard operation
gap copied to clipboard

Add `--quit-on-syntax-error` option?

Open fingolfin opened this issue 8 years ago • 3 comments

For our CI tests, it would be helpful if we could reliably and globally detect syntax errors – these often are not detected by tests, yet can contain crucial hints about issues.

To this end, having an option which turns every kernel call to SyntaxError (and possibly also SyntaxWarning) into a hard error with non-zero exit code would be useful.

fingolfin avatar Dec 04 '17 10:12 fingolfin

Max Horn writes:

For our CI tests, it would be helpful if we could reliably and globally detect syntax errors -- these often are not detected by tests, yet can contain crucial hints about issues.

To this end, having an options which turns every kernel call to SyntaxError (and possibly also SyntaxWarning) into a hard error with non-zero exit code would be useful.

I would like to be able to catch SyntaxError and SyntaxWarning for Jupyter (which will probably necessitate some "callback" mechanism?

markuspf avatar Dec 04 '17 11:12 markuspf

Seperate from @markuspf wanting a callback, we could extend/rename --quit-on-break to also cover syntax errors.

ChrisJefferson avatar Dec 04 '17 12:12 ChrisJefferson

There is --quitonbreak which does this, but no --quitonwarning. The latter would also be useful, e.g. for #2782.

olexandr-konovalov avatar Apr 22 '19 15:04 olexandr-konovalov