Enforce specific type usage via lint
Currently we have some best practices in our org that we would want to enforce on specific types users should use for primitives or wrapper types such as StringValue.
Would it be possible for Buf to add support for some custom rules which could be configured to allow enforcing all int64 types are sint64 for example?
There are many types in Protobuf 3 which leads to confusion and bad decisions taken on part by an unsuspecting user (see https://stackoverflow.com/questions/765916/is-there-ever-a-good-time-to-use-int32-instead-of-sint32-in-google-protocol-buff).
If this could be configurable that would be great. The granularity would be to disallow certain datatypes from appearing or another way could be doing an allowed type list as well (StringValue, IntValue, sint64, etc).
This would help us enforce these rules through automation rather than through documentation, word of mouth or PR review.
I think this would be a great addition to be able to configure "undesirable" types. For example the use of google.protobuf.Struct or google.protobuf.Any might not be desired for particular applications, as it introduces ambiguity, and might want to be prevented in particular design scenarios.
If there was a configurable linter option to provide a list of disallowed types, it would help a lot.
We can consider this, it's a little out of scope but I see the use case.
Tracking on https://github.com/bufbuild/buf/issues/29