alexevanczuk / packs

A pure Rust implementation of packwerk, a gradual modularization tool for Ruby
MIT License
70 stars 7 forks source link

Custom interpolation to allow for eventual custom violation messages #204

Closed perryqh closed 2 months ago

perryqh commented 4 months ago

Why

In a subsequent PR, we want to add the ability to customize violation error messages.

Example:

Instead of

Folder Visibility violation: ::Foo::CategoryGroup belongs to packs/product_services/foo/bar, which is not visible to packs/product_services/zoo/you as it is not a sibling pack or parent pack.

Allow for customization:

Product service boundary violation: ::Foo::CategoryGroup belongs to the packs/product_services/foo product service and cannot be accessed directly from the /packs/product_services/zoo product service. Use the packs/product_services/foo/public_api.