Skip to content

test: add test for type promotion in avoid_unnecessary_return_variable#308

Open
solid-illiaaihistov wants to merge 4 commits into
solid-software:analysis_server_migrationfrom
solid-illiaaihistov:226-add-avoid-unnecessary-return-variable-type-promotion-test
Open

test: add test for type promotion in avoid_unnecessary_return_variable#308
solid-illiaaihistov wants to merge 4 commits into
solid-software:analysis_server_migrationfrom
solid-illiaaihistov:226-add-avoid-unnecessary-return-variable-type-promotion-test

Conversation

@solid-illiaaihistov

Copy link
Copy Markdown
Collaborator

Closes #226

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new test case to verify that the avoid_unnecessary_return_variable lint rule does not report when a local variable is promoted to a generic type and returned. It also reformats an existing test case signature. The review feedback suggests improving the formatting of the modified test signature to avoid splitting the return type and method name, and removing trailing whitespace in the newly added test case.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@solid-illiaaihistov

Copy link
Copy Markdown
Collaborator Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds two new test cases to the avoid_unnecessary_return_variable lint rule tests to cover scenarios involving type promotion and variables used in subsequent return statements, alongside a minor test rename. The review feedback suggests improving the type promotion test by using Map<String, Object> instead of Map<String, dynamic> to ensure type promotion is statically required, and refactoring the second test to pass a boolean parameter instead of using a dummy 1 == 1 condition.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@solid-illiaaihistov

Copy link
Copy Markdown
Collaborator Author

Closes #225

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

Labels

None yet

Projects

None yet

1 participant