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
Description
Stale violations in deleted files aren't deleted.
To Reproduce
If you update a package TODO, delete the file that has the reference violation, and then run packwerk check, it will pass.
Expected Behaviour
It should fail, but packwerk doesn't inspect that file anymore and can't see that there are stale references in the TODO file.
Version Information
Packwerk: edge
Ruby v3.2.0
Additional Context
I think it might be useful to add CLI options to check and update that take deleted file violations into consideration. Right now, you have to do something like
unlessPackwerk::Cli.new(style: Packwerk::OutputStyles::Coloured.new).execute_command(["check"])exit(1)endPackwerk::Cli.new(style: Packwerk::OutputStyles::Coloured.new).execute_command(["update-deprecations"])unless%x(git status --porcelain).empty?puts<<~MESSAGE There were stale violations found, please run `packwerk update-deprecations`. MESSAGEexit(1)end
which isn't ideal.
The text was updated successfully, but these errors were encountered:
Description
Stale violations in deleted files aren't deleted.
To Reproduce
If you update a package TODO, delete the file that has the reference violation, and then run
packwerk check
, it will pass.Expected Behaviour
It should fail, but packwerk doesn't inspect that file anymore and can't see that there are stale references in the TODO file.
Version Information
Additional Context
I think it might be useful to add CLI options to check and update that take deleted file violations into consideration. Right now, you have to do something like
which isn't ideal.
The text was updated successfully, but these errors were encountered: