Closed pinkasey closed 2 years ago
how embarrasing -
I see that it does return exit code 1
.
Can you tell in which cases?
Maybe write it in the README.md
?
Hey @pinkasey, sorry for the delay in responding. It should return a non-zero exit code for any of the following findings:
(The only exceptions to this are for packages that provide executables or auto-applied builders, since we assume those to be used for convenience. The tool should make a note of those things, though.)
We do list those things in the readme, but it isn't explicitly stated that all of these should result in an non-zero exit code. I agree that would be a good note to add!
Also FYI we just released a bug fix (#78) because we were previously returning a zero exit code if the deprecated command-line arguments from v2 were used. That should now properly return a non-zero exit code, too.
Awesome Thanks
It would like to be able to use this plugin as part of CI/CD. mainly - if it detects an unused package, it should fail the build. Right now I see that it only prints to the cli.
So if you could add a flag like
--fail-on-unused-package
or something, and this flag would cause the execution to terminate with an error code - that would be enough for us to use this in CI/CD - simply runflutter pub run dependency_validator --fail-on-unused-package
, and if it fails - the build fails.WDYT?