You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/quick-start.md
+76-21Lines changed: 76 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,14 +84,28 @@ Open your browser and navigate to `http://localhost:8088`. You should see the No
84
84
85
85
## Step 4: Basic Configuration - Domain Modules
86
86
87
-
Now we'll configure Noesis to analyze your repository. Let's start by creating a basic configuration that will detect domain modules according to namespace hierarchy.
88
-
In order to acheive that you are going to configure two new volumes in the container:
87
+
Now we'll configure Noesis to analyze your repository and make the full use of directory structure presented in [Step 1](#step-1-prepare-directory-structure).
88
+
89
+
Let's start by creating a basic configuration that will detect domain modules according to namespace hierarchy.
90
+
In order to acheive that, you are going to configure two new volumes in the container:
89
91
-`externalSources` - it is a root directory of all the code repositories you want to scan
90
-
-`externalConfig` - is a path to .NET project where in Noesis DSL you will specify your scanning rules and architecture conventions
92
+
-`externalConfig` - is a path to a new .NET project where you will specify your scanning rules and architecture conventions, using Noesis DSL
93
+
94
+
### 4.0: Prepare code for analysis in `git-repos`
91
95
92
-
### 4.0: Make sure the code for analysis is in `git-repos`
96
+
Clone the .NET repo for analyis in the `git-repos` directory or make sure that it is already available there. In the tutorial we assume that your repo name is named `my-system-repo`
93
97
94
-
Clone the .NET repo to the `git-repos` directory or make sure that it is available there. In the tutorial we will assume that your repo name is `my-system-repo`no
98
+
```bash
99
+
cd git-repos/my-system-repo
100
+
git status
101
+
```
102
+
103
+
Make sure that the project in the repo can be succesfully compiled. It should be possible to make `dotnet restore` and `dotnet build` on this project. However you don't need to run these commands right now - just make sure they won't fail as Noesis scanning engine needs to run them independently on a repository copy to perform the succesful scan.
104
+
105
+
If you are not sure and want to be on the safe side run:
106
+
```bash
107
+
dotnet build
108
+
```
95
109
96
110
### 4.1: Create Configuration Project
97
111
@@ -107,39 +121,60 @@ dotnet new classlib -n noesis-config
107
121
cd noesis-config
108
122
```
109
123
124
+
Now add .NET NuGet packages to the project and test that it compiles
.System("My System") // System name in documentation
147
+
.Repositories(repositories=>repositories
148
+
.UseLocal("Main", "my-system-repo")) // Path to your repository relative to externalSources dir
149
+
.Conventions(conventions=>conventions
150
+
.ForDomainModules(convention=>convention
151
+
.UseNamespaceHierarchy())) // Creates modules from namespaces
152
+
.Build();
153
+
}
128
154
}
129
155
```
130
156
157
+
Play with the DSL if you want. You should be able additional versions of methods e.g. allowing to specify repository branch (which might be useful if your primary branch is not `main`). Check if the project correctly compiles
158
+
159
+
```bash
160
+
dotnet build
161
+
```
162
+
163
+
131
164
### 4.3: Run with Module Configuration
132
165
Navigate back to noesis-workspace
133
166
```bash
134
167
cd noesis-workspace
135
168
```
136
169
137
-
Run the docker command with the 2 new volumes added. **Please note that for `externalSources` you need to use root `git-repos` directory, not the full link to your repo!**
170
+
Run the docker command with the 2 new volumes added.
171
+
172
+
**Please note that for `externalSources` we use root `git-repos` directory, not the full link to your repo!**
0 commit comments