Buf v0.15.0 is released - allow opt-in comment-driven ignores with buf:lint:ignore annotation

203 views
Skip to first unread message

bufbuild-announce

unread,
May 31, 2020, 11:59:46 AM5/31/20
to bufbuild-announce
We have released Buf v0.15.0.

This release allows you to use comment-driven lint ignores. To enable, add the following to your buf.yaml configuration file:

lint:
  allow_comment_ignores: true

If this option is set, leading comments can be added within Protobuf files to ignore lint errors for certain components. If any line in a leading comment starts with buf:lint:ignore ID, then Buf will ignore lint errors for this ID. For example:

syntax = "proto3";

// buf:lint:ignore PACKAGE_LOWER_SNAKE_CASE
// buf:lint:ignore PACKAGE_VERSION_SUFFIX
package A;

For most situations, we do not recommend enabling this option. If this option is enabled, individual engineers within an organization can decide on their own lint exceptions, leading to inconsistencies across your Protobuf definitions - which of course is what buf check lint is helping you avoid! However, there are certain situations (such as migrations) when such functionality is useful, and we want users to be able to make informed, opt-in decisions. Therefore, we've added this option for such situations, and we hope it helps in such cases.

The documentation and brew tap have been updated.

Thanks for your continued support of Buf!
Reply all
Reply to author
Forward
0 new messages