Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline comment to skip linting #15

Open
blimmer opened this issue May 9, 2018 · 1 comment
Open

Inline comment to skip linting #15

blimmer opened this issue May 9, 2018 · 1 comment

Comments

@blimmer
Copy link

blimmer commented May 9, 2018

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
@lchenn
Copy link

lchenn commented Jun 3, 2018

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants