Skip to content

Plugin to check if setters are called on Protobuf object #4710

Open
@stym06

Description

Hey everyone,
I have a usecase to check if setter has been called on the Protobuf generated builder or not.
eg:

If this is my proto definition


syntax = "proto3";

message Person {
  string name = 1;
  string email = 2;
}

I want to add a check so that

Person person = Person.newBuilder().build();

the above code fails, because setName and setEmail methods are not called.

I looked at RedundantSetterCall but could not find anything like my use-case. Can someone guide me as to where I can find it if it's already been written, if not, I can help contribute it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions