How many ASTs does Sonar create for different files

Hello Community,

I have a general question for SonaeQube. I created the Grammar for a DSL. I want to write a rule that compares data from two different files. My question is the following, does Sonar create one big AST for the whole project or will it create several different ASTs for different files. In case of the latter, how can I compare data between two different files or is it even possible?

Best regards,

Yamen

Hi Yamen,

Welcome to the community!

What language are we talking about?

 
Ann

I have created my own Language, but is it different for different languages? I guess my question is general for all languages. If you need something specific, then let’s consider Java.

Thank you in advance

Hi,

If you’ve created your own analyzer, then it’s not a question of what SonarQube creates, but what you create. And I believe I’m correct in saying SonarQube analysis creates ASTs on a file level.

 
Ann