PythonModel

22 views
Skip to first unread message

Vladimir Topolev

unread,
Feb 8, 2018, 8:27:27 AM2/8/18
to SonarQube
I would like to ask whether there is intentions to modify the python-model. What do I mean? 
I've started to implement my own rules and I've found out that python model has uncomfortable model. 
Parser returns only tree of AstNode from SSLR-parser which allows to go through tree basing on operations "getParent", "getSubling", "getChilds"...
On the other hand Java for example has more specific model, for example, there is class MethodInvocation where I can comfortably extract
a name of the method, passing variables and etc. without going the tree again and again. 

Pierre-Yves Nicolas

unread,
Feb 8, 2018, 8:41:09 AM2/8/18
to Vladimir Topolev, SonarQube
Hi,

Only some of the language analysers built at SonarSource use what we call a "strongly typed tree" and SonarJava is one of them.
Ideally, all of our analysers would have such tree. However it requires a significant effort to move from AstNode to a strongly typed tree.
SonarPython is definitely one of the analysers for which we would like to do it, but we have no short-term plan to start this effort.

Regards,
Pierre-Yves


--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/a40b5aef-d0c3-4113-8a8d-a4ffec60004c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages