basedpyright icon indicating copy to clipboard operation
basedpyright copied to clipboard

config option to fail on warnings + replace `"all"` `typeCheckingMode` with new `"recommended"` where less serious diagnostics are warnings instead of error

Open DetachHead opened this issue 1 year ago • 3 comments

related: #315

it should probably default to the most strict. use case is that you want to differentiate between actual errors (likely to cause runtime crash) vs lint errors that won't necessarily crash but you still want to fail the CI

DetachHead avatar Oct 02 '24 02:10 DetachHead

if we do this, we should probably re-assess the "every rule is on by default" approach. instead we should probably just default to strict and make everything else warning by default. i think this is a decent compromise to some of the concerns people have raised about it (eg. https://github.com/DetachHead/basedpyright/issues/603#issuecomment-2303338467)

DetachHead avatar Oct 02 '24 07:10 DetachHead

having every rule error by default makes visually parsing a non trivially large error list quite difficult, and (nit) makes it harder at first glance to understand what is happening in a line of code

KotlinIsland avatar Oct 02 '24 22:10 KotlinIsland

--warnings already exists, but im going to add a new config file option called failOnWarnings to make it so that the new "recommended" typeCheckingMode still fails in the cli when any diagnostics are present

DetachHead avatar Oct 09 '24 10:10 DetachHead