Our developers are doing some TypeScript development, and are using the optional chaining
? feature. SonarJS is flagging the uses of this feature as a bug,
Expected an assignment or function call and instead saw an expression. via the
This has been reported numerous times:
And the commonly linked GitHub issue is closed: https://github.com/SonarSource/SonarJS/issues/1930
We are using the latest available version of SonarJS, but are still experiencing this issue. Is this issue still being worked on? If so, what is the status, and is there an ETA?
Currently the workaround is to manually resolve all instances of this bug in SonarQube, which is tedious to say the least. Another option is to entirely disable the
typescript:S905 rule, which I don’t like.
I apologize for opening yet another thread on this topic, but it’s unclear to me what the status of this issue is based on the other topics.
- SonarQube 7.9.4 Enterprise
- SonarScanner MSBuild 184.108.40.2061
- SonarJS 6.2.2, which is the latest available in the Marketplace
- TypeScript 3.7