rewrite-static-analysis
rewrite-static-analysis copied to clipboard
Function returns should not be invariant
see: https://rules.sonarsource.com/java/RSPEC-3516
When a method is designed to return an invariant value, it may be poor design, but it shouldn’t adversely affect the outcome of your program. However, when it happens on all paths through the logic, it is surely a bug.
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.