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

Documentation: --config parameter is needed or no violations are found #798

Closed
indy5858 opened this issue Apr 25, 2023 · 1 comment · Fixed by #799
Closed

Documentation: --config parameter is needed or no violations are found #798

indy5858 opened this issue Apr 25, 2023 · 1 comment · Fixed by #799

Comments

@indy5858
Copy link

The documentation on the default branch (develop) currently says that
npx depcruise src
will trigger a scan. However, leaving out the --config .dependency-cruiser.js option does not work. It results in no violations being reported.

Possible Solution

  • Either make sure that the default .dependency-cruiser.js works without additional configuration parameter
  • Or update the docs to include the parameter --config .dependency-cruiser.js

Context

It took quite a while to figure out, why dependency-cruiser was not reporting any violations, albeit having processed all the modules. People trying out dependency-cruiser will probably stumble upon this (given they have the same environment as me) and not continue working with the tool.

Your Environment

  • Version used: 12.11.3
  • Node version: v16.13.2
  • Operating System and version: Windows 10
  • Link to your project: N.A.
@sverweij
Copy link
Owner

Hi @indy5858 thanks for taking the time to investigate and to raise this issue!

In version 13 (currently in beta) the --config parameter isn't needed anymore, unless you want to use an alternative name or location for the configuration. In v12 (latest stable) you indeed still need to pass it.

I'll make updates to the README to prevent future users from bumping into this.

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

Successfully merging a pull request may close this issue.

2 participants