felipebz / zpa

Parser and static code analysis tool for PL/SQL and Oracle SQL.
https://zpa.felipebz.com
GNU Lesser General Public License v3.0
213 stars 78 forks source link

Not possible integration #131

Closed dantemon closed 4 years ago

dantemon commented 5 years ago

Hi, i have a problem when i add the plugin to the server, i can't start the server and i get this error you have a idea of what could be? Plugin error

felipebz commented 4 years ago

Hi @dantemon. Can you please check the logs at logs\web.log? Is there any exception there?

dantemon commented 4 years ago

Yeah i have the next exception Exception

felipebz commented 4 years ago

Thanks @dantemon. Do you have both "sonar-plsql-open-plugin-2.3.0.jar" and your custom plugin (e.g. "plsql-custom-rules-1.0-SNAPSHOT.jar") in the extensions/plugins directory? It seems you don't have the main plugin (sonar-plsql-open-plugin)...

I just tested here and SonarQube 7.7 developer edition starts correctly with my plugin: image

dantemon commented 4 years ago

Oh i think i miss the "sonar-plsql-open-plugin-2.3.0.jar" i didnt know i have to put it there, thanks a lot, i have another Question when i use the same code you use on the example i get a different AST, you think this could affect the plugin? or it doesnt matter that much, i hust think its weird this happen AST

dantemon commented 4 years ago

And another Question, it's possible to make both scan the same file extension or i have to forcefully decide which one have to scan it double extension

felipebz commented 4 years ago

when i use the same code you use on the example i get a different AST, you think this could affect the plugin?

No, it doesn't. My plugin is completely independent from SonarPLSQL (the commercial offering from SonarSource) and, being so, it doesn't generate the same AST.

it's possible to make both scan the same file extension or i have to forcefully decide which one have to scan it

Unfortunately, SonarQube doesn't allow that two different plugins analyze the same file. For now you'll have to choose between the plugins setting the properties sonar.plsql.file.suffixes (for SonarPLSQL) or sonar.zpa.file.suffixes (for ZPA) accordingly.

In the next months I intend to release the zpa-cli to enable this scenario. It'll be possible to analyze the same file with both SonarPLSQL and ZPA without having to install my plugin in the SonarQube server.

dantemon commented 4 years ago

Oh i see thanks a lot for your help i appreciate it

dantemon commented 4 years ago

when i use the same code you use on the example i get a different AST, you think this could affect the plugin?

No, it doesn't. My plugin is completely independent from SonarPLSQL (the commercial offering from SonarSource) and, being so, it doesn't generate the same AST.

it's possible to make both scan the same file extension or i have to forcefully decide which one have to scan it

Unfortunately, SonarQube doesn't allow that two different plugins analyze the same file. For now you'll have to choose between the plugins setting the properties sonar.plsql.file.suffixes (for SonarPLSQL) or sonar.zpa.file.suffixes (for ZPA) accordingly.

In the next months I intend to release the zpa-cli to enable this scenario. It'll be possible to analyze the same file with both SonarPLSQL and ZPA without having to install my plugin in the SonarQube server.

One last question when you think this new feature could be release, do you have some date on mind?

felipebz commented 4 years ago

To be honest, I don't have any date in mind. Maybe January 2020.

dantemon commented 4 years ago

I see, thanks a lot for all your help