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

Create example violations to show ArchUnit test in action #8

Open
hohwille opened this issue Jan 9, 2023 · 3 comments
Open

Create example violations to show ArchUnit test in action #8

hohwille opened this issue Jan 9, 2023 · 3 comments

Comments

@hohwille
Copy link
Contributor

hohwille commented Jan 9, 2023

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:

@hohwille hohwille moved this to 🆕 New in ArchUnit Board Jan 9, 2023
@hohwille hohwille moved this from 🆕 New to 📋 Backlog in ArchUnit Board Jan 16, 2023
@Bene90
Copy link

Bene90 commented Jan 16, 2023

Info:
This taks is relevant for everyone.

@hohwille
Copy link
Contributor Author

hohwille commented Mar 14, 2023

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
Copy link
Contributor Author

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

  • move them to feature branches directly in this repo rather than on external forks
  • remove any changes to the tests themselves but only add new code in main with violations to existing package
  • ensure completeness (all rules shall be covered) and alignment (PR per *Rules)
  • consider making the violations more representable (e.g. show real SQL injection vulnerability)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants