1- # pysonar-scanner
1+ # pysonar
22A wrapper around SonarScanner CLI, available on PyPI.
33
44# Disclaimer
@@ -15,34 +15,34 @@ These changes include configuration parameter names.
1515
1616Install with pip:
1717```
18- pip install pysonar-scanner
18+ pip install pysonar
1919```
2020
2121# Usage
2222
23- Once installed, the ` pysonar-scanner ` can be run from the command line to perform an analysis.
23+ Once installed, the ` pysonar ` scanner can be run from the command line to perform an analysis.
2424It assumes a running SonarQube server or a project configured on SonarCloud.
2525
2626## Setting up analysis properties
2727
2828In order for the analysis to run, analysis properties need to be defined.
2929There are multiple ways of providing these properties, described below in descending order of priority:
3030
31- * Through CLI arguments to the ` pysonar-scanner ` command
31+ * Through CLI arguments to the ` pysonar ` command
3232* Under the ` [tool.sonar] ` key of the ` pyproject.toml ` file
3333* Through common properties extracted from the ` pyproject.toml `
3434* In a dedicated ` sonar-project.properties ` file
3535* Through environment variables
3636
3737### Through CLI arguments
3838
39- Analysis properties can be provided as CLI arguments to the ` pysonar-scanner ` command.
39+ Analysis properties can be provided as CLI arguments to the ` pysonar ` command.
4040They follow the same convention as when running the SonarScanner CLI directly
4141(see [ documentation] ( https://docs.sonarsource.com/sonarqube/9.9/analyzing-source-code/scanners/sonarscanner/#running-from-zip-file ) ).
4242This means that analysis properties provided that way should be prepended with ` -D ` , for instance:
4343
4444```
45- $ pysonar-scanner -Dsonar.login=myAuthenticationToken
45+ $ pysonar -Dsonar.login=myAuthenticationToken
4646```
4747
4848You can use all the argument allowed by __ SonarScanner__ .
@@ -79,13 +79,13 @@ By default, the scanner will expect the `pyproject.toml` file to be present in t
7979However, its path can be provided manually through the ` toml.path ` ([ SCANPY-40] ( https://sonarsource.atlassian.net/jira/software/c/projects/PYSCAN/issues/PYSCAN-40 ) ) CLI argument as well as through the ` sonar.projectHome ` argument. For instance:
8080
8181```
82- pysonar-scanner -Dtoml .path= "path/to/pyproject.toml"
82+ pysonar --toml .path "path/to/pyproject.toml"
8383```
8484
8585Or:
8686
8787```
88- pysonar-scanner -Dsonar.projectHome= "path/to/projectHome"
88+ pysonar --sonar-project-home "path/to/projectHome"
8989```
9090
9191
@@ -127,7 +127,7 @@ It is also possible to define configure the scanner through environment variable
127127
128128```
129129$ export SONAR_HOST_URL="http://localhost:9000"
130- $ pysonar-scanner
130+ $ pysonar
131131```
132132
133133See the __ SonarScanner__ [ documentation] ( https://docs.sonarsource.com/sonarqube/9.9/analyzing-source-code/scanners/sonarscanner/ ) for more information.
@@ -137,7 +137,7 @@ See the __SonarScanner__ [documentation](https://docs.sonarsource.com/sonarqube/
137137To install the latest pre-released version of Sonar Scanner Python. Execute the following command:
138138
139139``` shell
140- pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pysonar-scanner
140+ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pysonar
141141```
142142
143143# License
0 commit comments