Comments (9)
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 :
-
write the getter yourself for these fields : in that case you can make sure that null is never returned by testing it before returning the value, and returning an empty list if it is.
-
tweak the Lombok annotation, as described here : https://projectlombok.org/features/experimental/onX
@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.
from arch-unit-maven-plugin.
Thanks. Unfortunately my issue is not with Lombok, but MapStruct, which has no way of configuring the generated methods.
from arch-unit-maven-plugin.
fixed in v2.4.0
from arch-unit-maven-plugin.
Still having this issue with arch-unit-maven-plugin
2.4.0
and arch-unit-build-plugin-core
2.5.2
. Is there anything that I have to configure specifically?
from arch-unit-maven-plugin.
yes, I've added a new config parameter (see the documentation) :
<excludedPaths>
<excludedPath>generated-sources</excludedPath>
</excludedPaths>
from arch-unit-maven-plugin.
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.
from arch-unit-maven-plugin.
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
from arch-unit-maven-plugin.
archUnit looks at the compiled code, not the source code
Oh right, I forgot about that. Looks like there's no way I can just ignore all classes in generated-sources
, as they are all compiled in their respective packages under target
. The most I can do is to group all the MapStruct classes in the same package and ignore the package. Thanks.
from arch-unit-maven-plugin.
maybe you can change that behavior by tweaking the maven-compile plugin... but not sure !
from arch-unit-maven-plugin.
Related Issues (20)
- Classes under excluded paths are checked by configurableRules. HOT 2
- Configuration get's mixed up in multi module build HOT 7
- 2.6.x no longer works with aggregate POM HOT 3
- Update minimum build plugin core version in README HOT 2
- is there any plan to support jdk15? HOT 4
- @ArchTest of type ArchTests are not picked up by plugin HOT 4
- excludedPath generated-sources leads to StringIndexOutOfBoundsException: String index out of range: -1 HOT 1
- parallel execution of arch-test gives maven warning HOT 1
- can we mark this plugin @threadSafe HOT 3
- Is there a ImportOption donotincludeTests option? HOT 1
- Import classes from Main and Test scope
- Change log level from info to warning when noFailOnError=true HOT 2
- fix all maven warnings during build + make sure tests are executed HOT 1
- Execute rule on the aggregator ('pom' packaging) HOT 1
- Skip analysis for projects without source files HOT 6
- Plugin error when updating from 4.0.0 to 4.0.1 HOT 1
- Allow to exclude single checks from a configurable rule
- How share the rules between services
- Question: should my custom rules extend the class com.societegenerale.commons.plugin.rules.ArchRuleTest?
- Generate HTML Report
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arch-unit-maven-plugin.