Skip to content

--strict flags #21396

@cossor

Description

@cossor

TL;DR restore the meaning of --static

elaborating the parenthesis in my pull request (#20982) ...

i was not serious when i suggested adding an --all flag. i prefer having --strict enable more flags, and the documentation supports this change (#3c9ee34). more precisely, i think --strict should enable two more flags:

  • --warn-unreachable is not a type checking feature, but i think the bugs it finds should be fixed. they are easy to fix, and enabling this flag would be consistent with the documentation: "This subset primarily includes checks for inadvertent type unsoundness." [emphasis added]

  • many people will expect --strict to enable --strict-equality-for-none. the bugs found by the new check are easy to fix, and they are also in my should-fix category. (trailing whitespace might be the best example of a should-fix bug.)

further simplification is possible. having --strict-equality-for-none imply --strict-equality would reduce command line length when the new check is desired. when i enabled this check, it found no errors in my code. so i think removing the flag and extending --strict-equality deserves consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions