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

[Bug Report] Improve strict mode #320

Open
gmcgibbon opened this issue Mar 3, 2023 · 2 comments
Open

[Bug Report] Improve strict mode #320

gmcgibbon opened this issue Mar 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@gmcgibbon
Copy link
Member

Description
Strict mode is a great feature for zero violation packages, but I think it could be better.

To Reproduce
Enable strict mode for a package and run packwerk check.

Expected Behaviour
There are two problems:

  • It should raise when you run check / update without having the violation already recorded in your package_todo.yml.
  • It should clearly indicates that the text is an error (add emojis or text colour or something to make it look like an error).

Screenshots

% bin/packwerk check
Running via Spring preloader in process 629777
running spring after_fork
📦 Packwerk is inspecting 58252 files
....[etc.]
📦 Finished in 13.49 seconds

No offenses detected
No stale violations detected
strict_package cannot have dependency violations on other_package because strict mode is enabled for dependency violations in the enforcing package's package.yml

Version Information

  • Packwerk: 3.0.0 / edge
  • Ruby 3.2.1

Additional Context
Add better error formatting and make the error happen sooner (without having to record it).

@gmcgibbon gmcgibbon added the bug Something isn't working label Mar 3, 2023
@morgan121
Copy link

Is there an update on this? It would be great if strict mode only stopped you adding new violations, but allowed existing violations to exist. We have only just implemented packwerk, and have a lot of cleaning up to do in terms of existing violations, but we want to ensure no new ones are added.

@morgan121
Copy link

The docs also imply strict mode is only for new violations, so if this behaviour isnt going to change perhaps they could be updated to better reflect what strict mode does?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants