-
Notifications
You must be signed in to change notification settings - Fork 298
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 unknown components in dependencies of PlantUML diagrams #1184
Conversation
f72f096
to
e3ed562
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for adding this!! 😃 🙏 Looks quite good, I just have some comments you can check out. One bigger is around adding the component
keyword support I guess, because for me that's a slightly different issue and should IMHO be split from ignoring dependencies from unknown components.
archunit/src/main/java/com/tngtech/archunit/library/plantuml/rules/PlantUmlComponents.java
Outdated
Show resolved
Hide resolved
archunit/src/main/java/com/tngtech/archunit/library/plantuml/rules/PlantUmlComponents.java
Outdated
Show resolved
Hide resolved
archunit/src/main/java/com/tngtech/archunit/library/plantuml/rules/PlantUmlParser.java
Show resolved
Hide resolved
archunit/src/main/java/com/tngtech/archunit/library/plantuml/rules/PlantUmlPatterns.java
Outdated
Show resolved
Hide resolved
archunit/src/main/java/com/tngtech/archunit/library/plantuml/rules/PlantUmlPatterns.java
Outdated
Show resolved
Hide resolved
archunit/src/test/java/com/tngtech/archunit/library/plantuml/rules/PlantUmlParserTest.java
Outdated
Show resolved
Hide resolved
e3ed562
to
472ed02
Compare
@codecholeric thanks for CR |
108b053
to
2e86f82
Compare
Otherwise, `Objects.requireNonNull(..)` causes false positives. Signed-off-by: Peter Gafert <peter.gafert@archunit.org>
The current implementation prevents using PlantUML diagrams as rules that are used for wider documentation purposes (e.g. containing a database component or some other dependency that's irrelevant from the point of an ArchUnit test). The consequence of ignoring such unknown components is only to allow fewer dependencies and fewer classes to be present. So, at best the test will fail as a false positive, if the components are declared wrongly by accident. Thus, there is no major harm in simply ignoring these unknown components and giving users a little more freedom what elements they want to use in their diagrams. Issue: TNG#1132 Signed-off-by: Tomasz Fijalkowski <3066563+tfij@users.noreply.github.com>
2e86f82
to
c1ecd8c
Compare
The current implementation prevents using PlantUML diagrams as rules
that are used for wider documentation purposes (e.g. containing a
database component or some other dependency that's irrelevant from the
point of an ArchUnit test).
The consequence of ignoring such unknown components is only to allow
fewer dependencies and fewer classes to be present.
So, at best the test will fail as a false positive, if the components
are declared wrongly by accident.
Thus, there is no major harm in simply ignoring these unknown components
and giving users a little more freedom what elements they want to use
in their diagrams.
Resolves: #1132