Skip to content

Conversation

perryqh
Copy link
Contributor

@perryqh perryqh commented Jul 30, 2024

Why is this change being made?

Allowing for checker violation error message overrides so that consumers can provide better contextual error messages.

What is this change doing?

Allows for new packwerk.yml checker_overrides.

Example

packwerk.yml

checker_overrides:
  privacy_error_template: "{{reference_location}}Privacy violation: `{{constant_name}}` is private to `{{defining_pack_name}}`, but referenced from `{{referencing_pack_name}}`. See https://go/pks-privacy"
  dependency_error_template: "{{reference_location}}Dependency violation: `{{constant_name}}` belongs to `{{defining_pack_name}}`, but `{{referencing_pack_relative_yml}}` does not specify a dependency on `{{defining_pack_name}}`. See https://go/pks-dependency"

@perryqh perryqh merged commit ea87ed9 into main Jul 30, 2024
@perryqh perryqh deleted the ph/check-error-template-overrides branch July 30, 2024 19:18
ivy added a commit that referenced this pull request Sep 23, 2025
- Rename test file: package_todo_format_test.rs → todo_format_validation_test.rs
- Add test for violations existing but no package_todo.yml files
- Add test for clean case with no violations and no todo files
- Correct test #2 to use privacy_violation_overrides fixture with actual violations
- Ensure validator correctly skips packs without todo files in all scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant