File tree 1 file changed +15
-0
lines changed 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -434,11 +434,26 @@ def parse_section(
434
434
"""
435
435
results : dict [str , object ] = {}
436
436
report_dirs : dict [str , str ] = {}
437
+
438
+ # Because these fields exist on Options, without proactive checking, we would accept them
439
+ # and crash later
440
+ invalid_options = {
441
+ "enabled_error_codes" : "enable_error_code" ,
442
+ "disabled_error_codes" : "disable_error_code" ,
443
+ }
444
+
437
445
for key in section :
438
446
invert = False
439
447
options_key = key
440
448
if key in config_types :
441
449
ct = config_types [key ]
450
+ elif key in invalid_options :
451
+ print (
452
+ f"{ prefix } Unrecognized option: { key } = { section [key ]} "
453
+ f" (did you mean { invalid_options [key ]} ?)" ,
454
+ file = stderr ,
455
+ )
456
+ continue
442
457
else :
443
458
dv = None
444
459
# We have to keep new_semantic_analyzer in Options
You can’t perform that action at this time.
0 commit comments