@@ -1574,9 +1574,14 @@ def __init__(self, *args, **kwargs):
15741574
15751575 for index , value in enumerate (options .exclude ):
15761576 options .exclude [index ] = value .rstrip ('/' )
1577- # Ignore all checks which are not explicitly selected
15781577 options .select = tuple (options .select or ())
1579- options .ignore = tuple (options .ignore or options .select and ('' ,))
1578+ if not (options .select or options .ignore or
1579+ options .testsuite or options .doctest ) and DEFAULT_IGNORE :
1580+ # The default choice: ignore controversial checks
1581+ options .ignore = tuple (DEFAULT_IGNORE .split (',' ))
1582+ else :
1583+ # Ignore all checks which are not explicitly selected
1584+ options .ignore = tuple (options .ignore or options .select and ('' ,))
15801585 options .benchmark_keys = BENCHMARK_KEYS [:]
15811586 options .ignore_code = self .ignore_code
15821587 options .physical_checks = self .get_checks ('physical_line' )
@@ -1824,11 +1829,6 @@ def process_options(arglist=None, parse_argv=False, config_file=None,
18241829 options .select = options .select .split (',' )
18251830 if options .ignore :
18261831 options .ignore = options .ignore .split (',' )
1827- elif not (options .select or
1828- options .testsuite or options .doctest ) and DEFAULT_IGNORE :
1829- # The default choice: ignore controversial checks
1830- # (for doctest and testsuite, all checks are required)
1831- options .ignore = DEFAULT_IGNORE .split (',' )
18321832
18331833 if options .diff :
18341834 options .reporter = DiffReport
0 commit comments