yoheimuta/protolint

Minor problem disabling warnings.

jenstroeger opened this issue · 3 comments

Hello @yoheimuta, first of all, thank you for a great project and I very much appreciate your efforts!

Second, I stumbled upon a problem with disabling warnings. Take this example:

// protolint:disable MAX_LINE_LENGTH

syntax = "proto3";

/** Schnufte test enumeration. */
enum TestEnum {
  TEST_ENUM_UNSPECIFIED = 0; // Unspecified.
  FOO = 1;                               // protolint:disable:this ENUM_FIELD_NAMES_PREFIX
}

which results in this warning although I had disabled it at the top of the file:

[test.proto:8:1] The line length is 90, but it must be shorter than 80

If I make that an extra long normal comment it works just fine; I suspect that special protolint: comments might collide here?

@jenstroeger Sorry for the late response, and thank you for reaching out.

It indeed collides here. This situation isn't what I had initially anticipated, so I'm working on it.

@jenstroeger I've fixed it and published it at https://github.com/yoheimuta/protolint/releases/tag/v0.46.3.
Can you confirm it when you have a moment?

Can you confirm it when you have a moment?

Great, thank you! I can confirm it’s now working 👍🏼