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
--lang | The language the project is written in | :heavy_check_mark: | python
46
46
47
-
This command lists the imports of each module in a yaml file. Use this fileas as a starting point to write dependency rules on which module can import what, using wildcards.
47
+
This command lists the imports of each module in a yaml file. Use this file as a starting point to write dependency rules on which module can import what, using wildcards.
48
48
49
49
Here is an example of additional rules added to the initial yaml file:
50
50
@@ -81,9 +81,9 @@ local_init: false
81
81
82
82
Here, for instance, the configuration file defines that `dep_check.infra.io` can import `dep_check.use_cases`, along with `dep_check.use_cases.build`, `dep_check.use_cases.check`, and so on.
83
83
84
-
*To see all the supported wildcards, check the [User Manual](https://github.com/lumapps/dep-check/blob/master/doc/usage.md#writing-your-own-configuration-file).*
84
+
*To see all the supported wildcards, check the [User Manual](https://github.com/lumapps/dep-check/blob/master/doc/usage.md#write-your-own-configuration-file).*
--lang | The language the project is written in | :heavy_check_mark: | python
120
120
121
121
*Note : if you generate a svg file, a dot file is also created in `/tmp/graph.dot`*
122
122
123
-
A lot of options are available to customize your graph (hide some modules, add layers etc.). Check the [User Manual](https://github.com/lumapps/dep-check/blob/master/doc/usage.md#adding-options) for more information.
123
+
A lot of options are available to customize your graph (hide some modules, add layers etc.). Check the [User Manual](https://github.com/lumapps/dep-check/blob/master/doc/usage.md#add-options) for more information.
--lang | The language the project is written in | :heavy_check_mark: | python
23
23
24
-
This command lists the imports of each module in a yaml file. Using this file, write some dependency rules on which module can import what, using wildcards.
24
+
This command lists the imports of each module in a yaml file. Use this file as a starting point to write dependency rules on which module can import what, using wildcards.
25
25
26
-
Here is an example:
26
+
Here is an example of additional rules added to the initial yaml file:
27
27
28
28
```yaml
29
29
---
@@ -63,7 +63,7 @@ You can build your own configuration file, using wildcards. Here are those suppo
63
63
* `[d-y]` corresponds to any character between 'd' and 'y'
64
64
* `[!d-y]` corresponds to any character which is **not** between 'd' and 'y'
65
65
* `[!abc]` corresponds to any character except 'a', 'b' or 'c'
66
-
* Using the `%` character after a module name (e.g. `my_module%`) includes this module along with its sub-modules.
66
+
* Use `%` after a module name (e.g. `my_module%`) to include this module along with its sub-modules.
67
67
68
68
### Examples
69
69
@@ -74,7 +74,7 @@ mymodule:
74
74
- othermodul?_[0-9]
75
75
```
76
76
77
-
With those rules, we tell the tool that `mymodule` can import:
77
+
Here, the rules define that `mymodule` can import:
ROOT_DIR | The root directory of your project, containing you source files | :x: | *N/A*
110
-
-c / --config | The input file in which you wrote the dependency rules (yaml format) | :heavy_check_mark: | dependency_config.yaml
111
-
--lang | The language your project is written in | :heavy_check_mark: | python
109
+
ROOT_DIR | The project root directory, containing the source files | :x: | *N/A*
110
+
-c / --config | The yaml file in which you wrote the dependency rules | :heavy_check_mark: | dependency_config.yaml
111
+
--lang | The language the project is written in | :heavy_check_mark: | python
112
112
113
-
The command reads the configuration file, and parse every source file. It then verifies, for each file, that every `import` is authorized by the rules in the configuration file.
113
+
The command reads the configuration file, and parses each source file. It then verifies, for each file, that every `import` is authorized by the rules defined in the configuration file.
114
114
115
115
When it's done, it writes a report on the console, listing import errors by module and unused rules:
116
116
117
117

118
118
119
119
## Draw a dependency graph
120
120
121
+
**You need to have graphviz installed to run this command**
--lang | The language the project is written in | :heavy_check_mark: | python
132
133
133
134
*Note : if you generate a svg file, a dot file is created in `/tmp/graph.dot`*
134
135
135
136

136
137
137
138
### Add options
138
139
139
-
The graph you'll get may seem unreadable if your project is pretty big. If that's the case, add options to the graph you want to draw, using a YAML config file.
140
+
The graph you'll get may seem unreadable if your project is pretty big. If that's the case, add options to the graph you want to draw, using a YAML configuration file.
0 commit comments