Assignments should not be redundant
see: https://rules.sonarsource.com/java/RSPEC-4165
This rule raises an issue when an assignment is useless because the assigned-to variable already holds the value on all execution paths.
This rule uses a resolves each flow of a symbol to check the end states for redundant assignments.
It's a really interesting problem, but I am putting this aside since it will take a significant time investment.
Going to close this for now. While we could hack something together now, a more thorough treatment requires support for dataflow analysis that we haven't yet begun to design.
@sambsnyd Dataflow analysis is in development