Skip to content

Commit 64d8a3f

Browse files
committed
docs: add note about --check usage
1 parent d6f4ec1 commit 64d8a3f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ All checks passed.
168168
No circular dependencies found.
169169
```
170170

171+
**Note:** When using `--check` without a type before PATH, use `--check=all`:
172+
```bash
173+
> import_deps --check=all foo/ # OK
174+
> import_deps foo/ --check # OK
175+
```
176+
171177
This is useful for CI/CD pipelines to enforce code quality rules.
172178

173179
### Check for circular dependencies

import_deps/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ def main(argv=sys.argv):
181181
help='Output results in DOT format for graphviz')
182182
parser.add_argument('--check', nargs='?', const='all', metavar='TYPE',
183183
choices=['all', 'circular', 'reimports', 'inner'],
184-
help='Run checks: all (default), circular, reimports, or inner')
184+
help='Run checks: all (default), circular, reimports, or inner. '
185+
'Use --check=all before PATH, or --check after PATH')
185186
parser.add_argument('--sort', action='store_true',
186187
help='Output modules in topological sort order (dependencies first)')
187188
parser.add_argument('--all-imports', action='store_true',

0 commit comments

Comments
 (0)