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
When a package is in ignoreDependencies but then gets used, Knip gives off a configuration hint. They're useful, but only if you notice them. I primarily run checks in CI, so if it doesn't error, I don't see it. I'd love to convert these issues into errors, forcing me to remove them so that the config stays clean and up-to-date.
Given that hints exist, all of the logic is probably there; this'll probably just need to wired up to however you manage exit codes.
The text was updated successfully, but these errors were encountered:
I think they have reported issues detached from the configuration hints, but maybe some refactor could lead to this feature.
I'd love to have this one cause I encountered the same scenario where configuration hints could eventually not be seen because they are kind of silent (warnings, and not errors).
Just wanted to chime in to say that I have the exact same problem as the original post. The configuration hints are always going to be hidden for me, since I never run knip on my local laptop. That's a big shame, since they are so useful. (And I imagine a lot of time went into creating the feature in the first place!)
Please consider adding this option/feature to a future release, as other command-line tools have similar options:
TypeDoc offers the option treatWarningsAsErrors to achieve this. (I think this would be a natural flag/option name for Knip to follow suit.)
Docusaurus has even more granularity, having helpful options which allow you to specify whether you want warnings or errors, which go on to affect the exit code:
Suggest an idea for Knip
When a package is in
ignoreDependencies
but then gets used, Knip gives off a configuration hint. They're useful, but only if you notice them. I primarily run checks in CI, so if it doesn't error, I don't see it. I'd love to convert these issues into errors, forcing me to remove them so that the config stays clean and up-to-date.Given that hints exist, all of the logic is probably there; this'll probably just need to wired up to however you manage exit codes.
The text was updated successfully, but these errors were encountered: