From 014965798d427a4df68dc76fce4c84a8ed5b5108 Mon Sep 17 00:00:00 2001 From: Christopher Kohnert Date: Sun, 5 Apr 2026 12:34:53 -0700 Subject: [PATCH 1/2] Add documentation link to check annotation --- buf/plugin/check/v1/annotation.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/buf/plugin/check/v1/annotation.proto b/buf/plugin/check/v1/annotation.proto index 7698705..9889e0c 100644 --- a/buf/plugin/check/v1/annotation.proto +++ b/buf/plugin/check/v1/annotation.proto @@ -54,4 +54,8 @@ message Annotation { // this may reference the deleted FileDescriptor in against_file_descriptors, while file_location // will not be present. buf.plugin.descriptor.v1.FileLocation against_file_location = 4; + // A URL that provides more human-readable information about the rule in question. + // + // Optional. + string documentation_link = 5; } From f752b298d9039a98f61fb2b0178921649e5a2fd1 Mon Sep 17 00:00:00 2001 From: Christopher Kohnert Date: Sun, 5 Apr 2026 13:55:08 -0700 Subject: [PATCH 2/2] Add optional rule failure code to annotations --- buf/plugin/check/v1/annotation.proto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/buf/plugin/check/v1/annotation.proto b/buf/plugin/check/v1/annotation.proto index 9889e0c..8ef93a9 100644 --- a/buf/plugin/check/v1/annotation.proto +++ b/buf/plugin/check/v1/annotation.proto @@ -58,4 +58,12 @@ message Annotation { // // Optional. string documentation_link = 5; + // An optional identifier that can help refine exactly how the rule was violated. + // + // Optional. + // + // Simple rules will probably not require this level of detail because it is obvious, but + // for more complex logic (such as checks involving external systems), it can be helpful to + // provide an identifier that narrows down why the rule failed. + string failure_code = 6; }