Skip to content

Do not generate constructors with no-arg super() #1687

@Steve973

Description

@Steve973

I notice that, when I generate a class with constructors, it inserts super(); as the first line. This is 2025, and we all know that this is never, ever necessary, so you should avoid calls to super unless you need to pass arguments. If linting gets executed on the generated directories, this will create a finding. Sure, we can add exceptions, but this should really not be part of the generated code.

I am curious if there are cases where this utility generates child classes of other classes that do not include a no-args constructor. If this line gets inserted unconditionally, then this would produce code that will not compile. If this is not inserted unconditionally, then the question remains about why it is generated when it is not passing any arguments.

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