TypeError: Cannot read property 'name' of undefined

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)

SonarQube server 7.6.0
SonarJS (javascript)

  • error observed (wrap logs/code around triple quote ``` for proper formatting)
15:25:57.541 DEBUG: Starting external process `node --max-old-space-size=2048 c:\w\UI\WebUI_master_SQ_plmapol\WebUI\.scannerwork\sonarts-bundle\node_modules\tslint-sonarts\bin\tsrunner`
15:26:10.338 ERROR: Rule error during analysis of : [PATH_TO_FILE] TypeError: Cannot read property 'name' of undefined
15:26:10.338 ERROR:     at Visitor.getSwappedPairArgument (c:\w\UI\WebUI_master_SQ_plmapol\WebUI\.scannerwork\sonarts-bundle\node_modules\tslint-sonarts\lib\rules\argumentsOrderRule.js:68:47)
15:26:10.338 ERROR:     at Visitor.visitCallExpression (c:\w\UI\WebUI_master_SQ_plmapol\WebUI\.scannerwork\sonarts-bundle\node_modules\tslint-sonarts\lib\rules\argumentsOrderRule.js:51:54)

Hello Maciej,

Welcome to our community, and thank you for your message.

The problem seems coming from the implementation of the rule S2234.

Would it possible to provide me with a reproducer triggering the issue ?