Exclude generated class from code analysis?

I’m currently developing a new ClementineRemote binding.

This binding communicates with a Clementine Player instance through a protobuf based protocol.

To create and parse the respective messages, a class ClementineRemote is hosted within the bundle. This class is created from a protobuf description file (see bundles/org.openhab.binding.clementineremote/proto/remotecontrolmessages.proto)
This file is created using the command

protoc --java_out=src/main/java/ proto/remotecontrolmessages.proto

and does not conform to the coding guidelines.

However, as it is generated from the description file, I have a strong feeling that this might be ok.

Am I right, and if so, how can I exclude the generated class from static code analysis (which would fail the build currently)?

I’ve read the docs now for several days. The only hint I found is

Exceptions can certainly be made, but they should be discussed and approved by a project maintainer upfront.

in the first paragraph of the Coding Guidelines.

But there is no hint as to how to contact the maintainers, or what should be done.

Some checks only apply to code that is in the org.openhab package so maybe it already helps to move the class to another package.

There’s also a Checkstyle suppressions.xml file where checks can be disabled.

They read the community posts and they will also get in contact with you when you create a pull request on GitHub because they first review the code before it gets merged. :slightly_smiling_face:

Thank you. The generated class file already is located in a separate package.

Nonetheless, the static code analysis complains :wink:

So I will try to add it in a separate commit and then drop a pull request.

I’ve had a look in the file, and decided it might be better, if someone does this, who knows OH a bit longer than me.