Could not retrieve http://update.sonarsource.org/plugins/python-confluence-include.html - Page not found.
Enables the powerful SonarPython analyzer. Supports both Python 2 and Python 3.
First Analysis of a Python Project
- Install SonarQube Server (see Setup and Upgrade for more details)
- Install SonarQube Scanner and be sure your can call sonar-scanner from the directory where you have your source code
- Install SonarPython (see Installing a Plugin for more details)
- (Optional) Execute Pylint if you want to activate Pylint rules and import its report
Run your analysis with the SonarQube Scanner by executing the following command from the root directory of the project:
- Follow the link provided at the end of the analysis to browse your project's quality in SonarQube UI
Assuming steps 1-3 above have already been completed, you'll want to encapsulate your analysis parameters in a sonar-project.properties file at the root of your project (see a sample project on GitHub: https://github.com/SonarSource/sonar-scanning-examples/tree/master/sonarqube-scanner). Then subsequent analyses can simply be run with:
With SonarPython, you can:
- import Unit Tests Execution Reports
- import Coverage Results
- Import Pylint Issues Report
- Import Bandit Issues Reports
- create your own Custom Rules