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

#3: implement component rules C3 + C4 - violations #30

Draft
wants to merge 32 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
350da3e
Added first draft for C2:
vlad961 Feb 21, 2023
5997389
Added first draft for C3:
vlad961 Feb 21, 2023
2a1ac45
Added first C4 draft.
vlad961 Feb 22, 2023
845c130
Added new draft for C4Layer2Logic4ComponentTest
vlad961 Feb 27, 2023
f1942b6
First commits of rule C5 - C7
NicolasVanBellen Feb 27, 2023
6bb5fb1
First commits for rules C5 - C7
NicolasVanBellen Feb 27, 2023
5cca862
Merge branch 'add-component-rules' of https://github.com/NicolasVanBe…
NicolasVanBellen Feb 27, 2023
796411d
almost final version of rules C5 - C7
NicolasVanBellen Feb 27, 2023
1245dcb
Refactored C4 Rule.
vlad961 Feb 28, 2023
c756ba7
Refactored C3:
vlad961 Feb 28, 2023
604f310
Refactored C2
vlad961 Feb 28, 2023
e3cb032
Refactoring C4 Rule + Delete C2 Rule
vlad961 Mar 3, 2023
b056642
Added C3 and C4 rule violations
vlad961 Mar 3, 2023
520c8ef
Merge branch 'devonfw-sample:master' into add-component-rules
vlad961 Mar 3, 2023
7e37d74
Merge branch 'devonfw-sample:master' into add-component-rules-violations
vlad961 Mar 3, 2023
8706f9b
Update ComponentRuleC4LayerService2Logic4ComponentTest.java
vlad961 Mar 6, 2023
22a8e76
Update C4ViolationServiceLayerOfComponentbDependsOnLogicLayerOfCompon…
vlad961 Mar 6, 2023
7181db3
Merge branch 'vlad961:add-component-rules' into add-component-rules
NicolasVanBellen Mar 6, 2023
95e5e6c
Output changes
NicolasVanBellen Mar 6, 2023
f09430d
Merge pull request #2 from NicolasVanBellen/add-component-rules
vlad961 Mar 6, 2023
2ad2e67
Refactored C3 and C6
vlad961 Mar 6, 2023
b1dc513
Merge branch 'devonfw-sample:master' into add-component-rules
vlad961 Mar 13, 2023
9d3b6ad
Merged all component rules into one file.
vlad961 Mar 13, 2023
e9fb527
Update ComponentRuleTest.java
vlad961 Mar 13, 2023
4d5f159
Merge branch 'devonfw-sample:master' into add-component-rules
vlad961 Mar 14, 2023
ee69830
Reworked Component Rules
vlad961 Mar 14, 2023
0e1fa34
Merge branch 'add-component-rules' into add-component-rules-violations
vlad961 Mar 17, 2023
6eaa74d
Merge branch 'master' into add-component-rules
hohwille Mar 17, 2023
32b26e3
Merge branch 'master' into add-component-rules
hohwille Mar 20, 2023
60c4b38
Update ComponentRuleTest.java
vlad961 Mar 20, 2023
366878c
Merge branch 'add-component-rules' into add-component-rules-violations
vlad961 Mar 21, 2023
8961707
Merge branch 'master' into add-component-rules-violations
vlad961 Mar 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.devonfw.sample.archunit.componentb.logic;

public class C4PositiveTest {
//Demo class. C4ViolationServiceLayerOfComponentbDependsOnLogicLayer class can depend on this class.
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.devonfw.sample.archunit.componentb.service;

import com.devonfw.sample.archunit.task.service.TaskService;

public class C3ViolationServiceLayerOfComponentbDependsOnServiceLayerOfComponentTask {
TaskService taskService; // noncompliant
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.devonfw.sample.archunit.componentb.service;

import com.devonfw.sample.archunit.componentb.logic.C4PositiveTest;
import com.devonfw.sample.archunit.general.common.ApplicationEntity;
import com.devonfw.sample.archunit.general.logic.AbstractUc;
import com.devonfw.sample.archunit.task.common.TaskItem;
import com.devonfw.sample.archunit.task.logic.UcDeleteTaskItem;

public class C4ViolationServiceLayerOfComponentbDependsOnLogicLayerOfComponentTask {
// Forbidden dependency covered
UcDeleteTaskItem ucDeleteTaskItem; // noncompliant (different components logic layer)

// Forbidden dependencies uncovered

TaskItem taskItem; // noncompliant (wont violate C4 test. Should be caught by other rules)

//TaskItemEntity taskItemEntity; // noncompliant (wont violate C4 test. Should be caught by layer rules)

// Allowed dependencies
C4PositiveTest c4PositiveTest; // compliant (same components logic layer)

ApplicationEntity applicationEntity; // compliant (projects default component)

AbstractUc abstractUc; // compliant (projects default component)

}