- Operating system: Win10
- SonarLint plugin version: 3.8.0
- Is connected mode used: Yes
- Connected to SonarCloud or SonarQube (and which version): SonarQube 8.9.7 (build 52159)
And a thorough description of the problem / question:
There is a false positive when a parameter is conditionally reassigned, raising an issue as if the parameter were completely ignored when it is used in most cases and overridden only in one other. The behavior is also inconsistent, being observed only inside a code block (such as a try-catch); moving the code outside the block (e.g. here, removing the try/catch) gets rid of the false positive but may have other unwanted impacts. The false positive is also not observed in TypeScript.