Skip to content

The code generator produces code with linter warning #632

@Losses

Description

@Losses

Describe the Bug

The code generator produces dart code with liter warning which is impossible to be suppressed.

In great detail, the generated file:

bindings/bincode/bincode_serializer.dart

with these two functions:

  @override
  void serializeLength(int value) {
    serializeUint64(Uint64(BigInt.from(value)));
  }

  @override
  void serializeVariantIndex(int value) {
    serializeUint32(value);
  }

Have the following issue:

The parameter name 'value' doesn't match the name 'len' in the overridden method.
Try changing the name to 'len'.dart[avoid_renaming_method_parameters](https://dart.dev/diagnostics/avoid_renaming_method_parameters)
The parameter name 'value' doesn't match the name 'index' in the overridden method.
Try changing the name to 'index'.dart[avoid_renaming_method_parameters](https://dart.dev/diagnostics/avoid_renaming_method_parameters)

To Reproduce

Steps to reproduce the behavior:

  1. executing rinf gen
  2. the problematic code generated

Expected Behavior

No warning should be reported

Additional Context

Output from the command below, shown in a Markdown code block.

❯ rustc --version
  flutter doctor
rustc 1.88.0 (6b00bc388 2025-06-23)
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.4, on NixOS 25.05 (Warbler) 6.15.6, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2024.2)
[✓] Android Studio (version 2023.3)
[✓] Connected device (1 available)
[✓] Network resources

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions