google/protobuf.dart

Protobuf generated code has analyzer warnings

feinstein opened this issue · 1 comments

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;
}

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.