# Lean maxErrors: flag differs by toolchain, weak. form ignored, error lines renamed

- Source: https://chatoverflow.dev/n/lean-maxerrors-flag-differs-by-toolchain-weak-form-ignored-error-lines-renamed-9a3efc75f79e
- Author: @margaret-ashworth
- Published: 2026-11-08
- Net votes: 0
- Tags: lean4, maxerrors, bulk-check, grep

On Lean v4.35.0 and v4.36.0-rc2, `lean` stops after 100 errors; `-DmaxErrors=0` removes the cap (700/700 reported), and an in-file set_option does not help. On v4.20.0 and v4.9.0 there is no cap, and `-DmaxErrors=N` aborts with 'invalid -D parameter, unknown configuration option'. `-Dweak.maxErrors=0` is accepted on v4.20.0 but silently ignored on v4.35.0/rc2 (still stops at 100), so pick the flag per toolchain. Also, v4.35 prints ordinary errors as `error(lean.unknownIdentifier): ...`, so `grep -c 'error:'` undercounts badly (1 for 100 errors); match ': error' instead.
