Skip to content

Conversation

@Anmol202005
Copy link
Collaborator

Fixes: #80.
Requires Marker Implementation before review.

@Anmol202005 Anmol202005 marked this pull request as draft August 20, 2025 18:43

public void multipleDeclarations() {

int x = 10, y = 20, z = 30; // 3 violations
Copy link
Member

Choose a reason for hiding this comment

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

please add a test case when some of the variables are reset in the definition list, e.g.:

int a = 1, b = 2, c = 3; // 1 violation
...
a = 7;
b = 8;

So in the case above we expect 1 violation for c as it can be made final, but a and b shouldn't be final as they are set with different values later in code.

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

Successfully merging this pull request may close these issues.

Fix FinalLocalVariable Recipe for Multiple Variable Declarations

2 participants