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
Copy file name to clipboardExpand all lines: README.md
+27
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,7 @@ Instructions:
82
82
- Confirm the output of `git diff` is empty
83
83
- Please file an issue if it's not!
84
84
85
+
85
86
# New to Rust?
86
87
Me too! This is my first Rust project, so I'd love to have feedback, advice, and contributions!
87
88
@@ -155,6 +156,32 @@ enforcement_globs_ignore:
155
156
reason: "The other dependency violations are fine as those packs will be absorbed into this one."
156
157
```
157
158
159
+
## "check" error messages
160
+
The error messages resulting from running `pks check` can be customized with mustache-style interpolation. The available
161
+
variables are:
162
+
- violation_name
163
+
- referencing_pack_name
164
+
- defining_pack_name
165
+
- constant_name
166
+
- reference_location
167
+
- referencing_pack_relative_yml
168
+
169
+
Layer violations also have
170
+
- defining_layer
171
+
- referencing_layer
172
+
173
+
Example:
174
+
packwerk.yml
175
+
```yml
176
+
checker_overrides:
177
+
folder_privacy_error_template: "{{reference_location}} {{violation_name}} / Product Service Privacy Violation: `{{constant_name}}` belongs to the `{{defining_pack_name}}` product service, which is not visible to `{{referencing_pack_name}}` as it is a different product service. See https://go/pks-folder-privacy"
178
+
layer_error_template: "{{reference_location}}Layer violation: `{{constant_name}}` belongs to `{{defining_pack_name}}` (whose layer is `{{defining_layer}}`) cannot be accessed from `{{referencing_pack_name}}` (whose layer is `{{referencing_layer}}`). See https://go/pks-layer"
179
+
visibility_error_template: "{{reference_location}}Visibility violation: `{{constant_name}}` belongs to `{{defining_pack_name}}`, which is not visible to `{{referencing_pack_name}}`. See https://go/pks-visibility"
180
+
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"
181
+
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"
182
+
```
183
+
184
+
158
185
# Benchmarks
159
186
See [BENCHMARKS.md](https://github.com/rubyatscale/pks/blob/main/BENCHMARKS.md)
0 commit comments