protoc-gen-lint
protoc-gen-lint copied to clipboard
Inline comment to skip linting
Similar to eslint
and others, could we have a comment to skip linting of specific blocks of code?
For instance, in eslint I could do this:
/* eslint-disable */
alert('foo');
/* eslint-enable */
https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments
Rubocop also has something similar
# rubocop:disable all
[...]
# rubocop:enable all
https://github.com/bbatsov/rubocop/blob/master/manual/configuration.md#disabling-cops-within-source-code
Especially with protocol buffers, changing messages that are already out there is not recommended. Could we expose a way to disable linting via comments? For instance:
// NOTE: the properties start wtih capital letters in order to flawlessly map to an AWS SQSMessage object
// protoc-gen-lint:disable
message SqsMessage {
string Type = 1;
string MessageId = 2;
string TopicArn = 3;
}
// protoc-gen-lint:enable
+1