protolint icon indicating copy to clipboard operation
protolint copied to clipboard

RPC_NAMES_UPPER_CAMEL_CASE disable is ignored

Open dduugg opened this issue 2 years ago • 0 comments

I have some rpcs that added a disable following an invocation of protolint lint -auto_disable=this .:

service OrgSubscriptionGrpcManager {
    rpc findCurrentOrgSubscription (FindCurrentOrgSubscriptionRequest) returns (OneOrgSubscriptionResponse) { // protolint:disable:this RPC_NAMES_UPPER_CAMEL_CASE //
    }
    rpc findPartialPayEligibleSubscription (FindPartialPayEligibleSubscriptionRequest) // protolint:disable:this RPC_NAMES_UPPER_CAMEL_CASE
    returns (OneOrgSubscriptionResponse) {
    }
}

However, protolint continues to find violations for the disabled rule:

[protos/services/b2b/b2b.proto:15:5] RPC name "findCurrentOrgSubscription" must be UpperCamelCase like "FindCurrentOrgSubscription"
[protos/services/b2b/b2b.proto:17:5] RPC name "findPartialPayEligibleSubscription" must be UpperCamelCase like "FindPartialPayEligibleSubscription"

Interestingly, subsequent invocations of protolint lint -auto_disable=this . continue to append the same comment:

service OrgSubscriptionGrpcManager {
    rpc findCurrentOrgSubscription (FindCurrentOrgSubscriptionRequest) returns (OneOrgSubscriptionResponse) { // protolint:disable:this RPC_NAMES_UPPER_CAMEL_CASE // protolint:disable:this RPC_NAMES_UPPER_CAMEL_CASE
    }
    rpc findPartialPayEligibleSubscription (FindPartialPayEligibleSubscriptionRequest) // protolint:disable:this RPC_NAMES_UPPER_CAMEL_CASE // protolint:disable:this RPC_NAMES_UPPER_CAMEL_CASE
    returns (OneOrgSubscriptionResponse) {
    }
}

I'm on the latest protolint release (v0.48.0), with all_default: true as the rules set.

dduugg avatar Mar 11 '24 19:03 dduugg