-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore generated-sources #33
Ignore generated-sources #33
Comments
Thanks for this request ! Indeed, it could be interesting to set have an optional parameter in the config, to give a list of folders to ignore. We would have to implement it in https://github.com/societe-generale/arch-unit-build-plugin-core though. I faced the exact same issue, but found a workaround. Maybe it's not the same issue, but I'll mention the workaround anyway : By default, Lombok will generate getters on collections that don't have the javax.annotation.Nonnull annotation. And I had DontReturnNullCollectionTest rule raising violations. To avoid this, I found 2 solutions :
@Getter(onMethod_={@Nonnull}) But in that case, I am quite sure it's still possible that null is returned, even though the annotation says otherwise - so it may be misleading. |
Thanks. Unfortunately my issue is not with Lombok, but MapStruct, which has no way of configuring the generated methods. |
fixed in v2.4.0 |
Still having this issue with |
yes, I've added a new config parameter (see the documentation) :
|
Just tried with that, seems like it doesn't work either. It only seems to match the package name or class name, not the full path. |
archUnit looks at the compiled code, not the source code. Do you know in which folder your generated-sources code gets compiled ? you could try to configure this directory instead |
Oh right, I forgot about that. Looks like there's no way I can just ignore all classes in |
maybe you can change that behavior by tweaking the maven-compile plugin... but not sure ! |
Summary
Currently the predefined rules are also scanning class files in
generated-sources
, which I have no control over. Is there a way to configure the plugin to ignoregenerated-sources
?Type of Issue
It is a :
Motivation
I don't have any control over the class files generated in
generated-sources
, thus have no way to resolve violations in the generated class files.The text was updated successfully, but these errors were encountered: