Skip to content

Custom linter: Enforce default header initialization of member variables #542

Description

@MonsterDruide1

The result of another discord poll shows that we should introduce = [VALUE]; for all member variables, if possible and known to not cause problems.

To avoid adding comments on instances where this is not desired (intentionally left uninitialized), this should rather be done by scanning the constructor implementation and checking whether these values are overridden in the initializer list again. Only if a variable is listed in all constructors' initializer lists, it should be shown as warning/error in our custom linter.

Note that constructors can occur both in the .cpp and .h files, even above the member variable declarations itself.

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