Skip to content
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

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

tfij
Copy link
Contributor

@tfij tfij commented Nov 1, 2023

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

Copy link
Collaborator

@codecholeric codecholeric left a 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.

@tfij
Copy link
Contributor Author

tfij commented Jan 2, 2024

@codecholeric thanks for CR
all comments applied

@codecholeric codecholeric force-pushed the ignore_unknow_components branch 3 times, most recently from 108b053 to 2e86f82 Compare April 10, 2024 20:42
@codecholeric codecholeric changed the title Issue 1132: Ignore unknow components in dependencies ignore unknown components in dependencies of PlantUML diagrams Apr 10, 2024
codecholeric and others added 2 commits April 10, 2024 23:10
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>
@codecholeric codecholeric merged commit 0daf60e into TNG:main Apr 10, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for database component type in plantuml
2 participants