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

Protobuf generated code has analyzer warnings #822

Open
feinstein opened this issue Apr 21, 2023 · 1 comment
Open

Protobuf generated code has analyzer warnings #822

feinstein opened this issue Apr 21, 2023 · 1 comment

Comments

@feinstein
Copy link

I am getting these 2 analyzer warnings for my generated protobuf code:

info: The imported package 'fixnum' isn't a dependency of the importing package. (depend_on_referenced_packages at [google_auth_exporter] lib\data\models\google_auth.pb.dart:10)

info: The local variable '_result' starts with an underscore. (no_leading_underscores_for_local_identifiers at [google_auth_exporter] lib\data\models\google_auth.pb.dart:39)

info: The local variable '_result' starts with an underscore. (no_leading_underscores_for_local_identifiers at [google_auth_exporter] lib\data\models\google_auth.pb.dart:166)

This is my proto file:

// LICENSE: GNU General Public License v3.0 to Beem Development (https://github.com/beemdevelopment)
// From https://github.com/beemdevelopment/Aegis/pull/406/files#diff-410b85c0f939a198f70af5fc855a21ed
// Changes: modified package name.

syntax = "proto3";

package googleauth;

message MigrationPayload {
  enum Algorithm {
    ALGO_INVALID = 0;
    ALGO_SHA1 = 1;
  }

  enum OtpType {
    OTP_INVALID = 0;
    OTP_HOTP = 1;
    OTP_TOTP = 2;
  }

  message OtpParameters {
    bytes secret = 1;
    string name = 2;
    string issuer = 3;
    Algorithm algorithm = 4;
    int32 digits = 5;
    OtpType type = 6;
    int64 counter = 7;
  }

  repeated OtpParameters otp_parameters = 1;
  int32 version = 2;
  int32 batch_size = 3;
  int32 batch_index = 4;
  int32 batch_id = 5;
}
@srawlins
Copy link
Contributor

As these are all lint, a duplicate request here: #803

However... it does seem like it'd be a good idea to add an explicit dependency on fixnum, to handle depend_on_referenced_packages.

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

No branches or pull requests

2 participants