Hello all,
I’m using SonarQube version 9.2.0.49834 and sonar-scanner version 4.6.2.2472 on Linux.
I tried to scan a Jupyter notebook file but it returns this message: “The main branch of this project is empty.”
Then I changed the settings on Administration → Configurations → Languages → Python and added ipynb (the image).
But now I get very bad results because it is treating it as a py file which is not the case.
I think there should be a better solution available. Any ideas?
Hi @Roozbeh,
Welcome to our community!
SonarQube doesn’t support yet Jupyter Notebooks, however we plan to work on it in the following months.
In the meanwhile, feel free to upvote Jupyter Notebooks feature request in our portal.
Uh, I see.
Thanks for your reply.
So adding ipynb in the settings is not the proper solution, and it creates false/positive results. Yes?
Adding ipynb in the settings would not work because SonarQube wouldn’t be able to parse them as Python files (as they are actually JSON files containing Python code - which our Python analyzer doesn’t expect). Thus, the files won’t be analyzed at all.
We know Jupyter Notebooks are very popular, though. So it’s definitely something we plan to support later this year.
Actually, I didn’t understand. Because in the sample project that I have, when I added ipynb, it is running and giving me some results. I just don’t know if these results are trustable.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.