devonfw-sample / archunit

Template of devon4j architecture validation with ArchUnit and demonstration
Apache License 2.0
6 stars 7 forks source link

Create example violations to show ArchUnit test in action #8

Open hohwille opened 1 year ago

hohwille commented 1 year ago

We need to have Java code that violates the architecture rules and shows our ArchUnit test(s) in action. For implementing this story, we should first think about the design as there are several options:

Bene90 commented 1 year ago

Info: This taks is relevant for everyone.

hohwille commented 1 year ago

I missed to review the first draft PR in all details:

-@AnalyzeClasses(packages = "com.devonfw.sample.archunit", importOptions = ImportOption.DoNotIncludeTests.class)
+@AnalyzeClasses(packages = "com.devonfw.sample.archunitviolations", importOptions = ImportOption.DoNotIncludeTests.class)

IMHO it is not a good idea to change any of the JUnits in a draft PR demonstrating violations. We should use the regular package namespace of our demo to show the violations in action.

Fortunately this pattern was not followed by all others when creating violation PRs.

hohwille commented 1 year ago

Draft PRs had been created. However, I will do some rework later with the following aspects: