The 'Introduce Variable' feature currently creates a var instead of a final variable. It should prioritize final when the variable is not reassigned.
Current Behavior:
Starting with:
await Something.initialize(
resourceAttributes: {
'service.environment': config.environment,
}.toAttributes(),
);
Using 'Introduce Variable' results in:
var attributes = {
'service.environment': config.environment,
}.toAttributes();
await Something.initialize(
resourceAttributes: attributes,
);
Desired Behavior:
It should generate:
final attributes = {
'service.environment': config.environment,
}.toAttributes();
await Something.initialize(
resourceAttributes: attributes,
);
The 'Introduce Variable' feature currently creates a
varinstead of afinalvariable. It should prioritizefinalwhen the variable is not reassigned.Current Behavior:
Starting with:
Using 'Introduce Variable' results in:
Desired Behavior:
It should generate: