@@ -44,116 +44,159 @@ def __parse_cli_args(cls) -> argparse.Namespace:
4444 "-t" ,
4545 "--token" ,
4646 "--sonar-token" ,
47+ "-Dsonar.token" ,
4748 type = str ,
4849 help = "Token used to authenticate against the SonarQube Server or SonarQube Cloud" ,
4950 )
5051 parser .add_argument (
5152 "--sonar-project-key" ,
53+ "-Dsonar.projectKey" ,
5254 type = str ,
5355 help = "Key of the project that usually corresponds to the project name in SonarQube" ,
5456 )
5557
5658 parser .add_argument (
57- "-v" , "--verbose" , "--sonar-verbose" , action = "store_true" , default = None , help = "Increase output verbosity"
59+ "-v" ,
60+ "--verbose" ,
61+ "--sonar-verbose" ,
62+ "-Dsonar.verbose" ,
63+ action = "store_true" ,
64+ default = None ,
65+ help = "Increase output verbosity" ,
5866 )
5967
6068 parser .add_argument (
6169 "--sonar-host-url" ,
70+ "-Dsonar.host.url" ,
6271 type = str ,
6372 help = "SonarQube Server base URL. For example, http://localhost:9000 for a local instance of SonarQube Server" ,
6473 )
6574 parser .add_argument (
6675 "--sonar-region" ,
76+ "-Dsonar.region" ,
6777 type = str ,
6878 choices = ["us" ],
6979 help = "The region to contact, only for SonarQube Cloud" ,
7080 )
71- parser .add_argument ("--sonar-user-home" , type = str , help = "Base sonar directory, ~/.sonar by default" )
81+ parser .add_argument (
82+ "--sonar-user-home" , "-Dsonar.userHome" , type = str , help = "Base sonar directory, ~/.sonar by default"
83+ )
7284
7385 parser .add_argument (
7486 "--sonar-scanner-cloud-url" ,
87+ "-Dsonar.scanner.cloudUrl" ,
7588 type = str ,
7689 help = "SonarQube Cloud base URL, https://sonarcloud.io for example" ,
7790 )
7891 parser .add_argument (
7992 "--sonar-scanner-api-url" ,
93+ "-Dsonar.scanner.apiUrl" ,
8094 type = str ,
8195 help = "Base URL for all REST-compliant API calls, https://api.sonarcloud.io for example" ,
8296 )
8397 parser .add_argument (
8498 "--sonar-scanner-os" ,
99+ "-Dsonar.scanner.os" ,
85100 type = str ,
86101 choices = ["windows" , "linux" , "macos" , "alpine" ],
87102 help = "OS running the scanner" ,
88103 )
89104 parser .add_argument (
90105 "--sonar-scanner-arch" ,
106+ "-Dsonar.scanner.arch" ,
91107 type = str ,
92108 choices = ["x64" , "aarch64" ],
93109 help = "Architecture on which the scanner will be running" ,
94110 )
95111
96112 parser .add_argument (
97113 "--skip-jre-provisioning" ,
114+ "-Dsonar.scanner.skipJreProvisioning" ,
98115 action = "store_true" ,
99116 default = None ,
100117 help = "If provided, the provisioning of the JRE will be skipped" ,
101118 )
102119 parser .add_argument (
103- "--sonar-scanner-java-exe-path" , type = str , help = "If defined, the scanner engine will be run with this JRE"
120+ "--sonar-scanner-java-exe-path" ,
121+ "-Dsonar.scanner.javaExePath" ,
122+ type = str ,
123+ help = "If defined, the scanner engine will be run with this JRE" ,
104124 )
105125 parser .add_argument (
106- "--sonar-scanner-java-opts" , type = str , help = "Arguments provided to the JVM when running the scanner"
126+ "--sonar-scanner-java-opts" ,
127+ "-Dsonar.scanner.javaOpts" ,
128+ type = str ,
129+ help = "Arguments provided to the JVM when running the scanner" ,
107130 )
108131
109132 parser .add_argument (
110133 "--sonar-scanner-internal-dump-to-file" ,
134+ "-Dsonar.scanner.internal.dumpToFile" ,
111135 type = str ,
112136 help = "Filename where the input to the scanner engine will be dumped. Useful for debugging" ,
113137 )
114138 parser .add_argument (
115139 "--sonar-scanner-internal-sq-version" ,
140+ "-Dsonar.scanner.internal.sqVersion" ,
116141 type = str ,
117142 help = "Emulate the result of the call to get SQ server version. Useful for debugging with --sonar-scanner-internal-dump-to-file" ,
118143 )
119144
120145 parser .add_argument (
121146 "--sonar-scanner-connect-timeout" ,
147+ "-Dsonar.scanner.connectTimeout" ,
122148 type = int ,
123149 help = "Time period to establish connections with the server (in seconds)" ,
124150 )
125151 parser .add_argument (
126152 "--sonar-scanner-socket-timeout" ,
153+ "-Dsonar.scanner.socketTimeout" ,
127154 type = int ,
128155 help = "Maximum time of inactivity between two data packets when exchanging data with the server (in seconds)" ,
129156 )
130157 parser .add_argument (
131158 "--sonar-scanner-response-timeout" ,
159+ "-Dsonar.scanner.responseTimeout" ,
132160 type = int ,
133161 help = "Time period required to process an HTTP call: from sending a request to receiving a response (in seconds)" ,
134162 )
135163
136164 parser .add_argument (
137165 "--sonar-scanner-truststore-path" ,
166+ "-Dsonar.scanner.truststorePath" ,
138167 type = str ,
139168 help = "Path to the keystore containing trusted server certificates, used by the Scanner in addition to OS and the built-in certificates" ,
140169 )
141- parser .add_argument ("--sonar-scanner-truststore-password" , type = str , help = "Password to access the truststore" )
170+ parser .add_argument (
171+ "--sonar-scanner-truststore-password" ,
172+ "-Dsonar.scanner.truststorePassword" ,
173+ type = str ,
174+ help = "Password to access the truststore" ,
175+ )
142176
143177 parser .add_argument (
144178 "--sonar-scanner-keystore-path" ,
179+ "-Dsonar.scanner.keystorePath" ,
145180 type = str ,
146181 help = "Path to the keystore containing the client certificates used by the scanner. By default, <sonar.userHome>/ssl/keystore.p12" ,
147182 )
148- parser .add_argument ("--sonar-scanner-keystore-password" , type = str , help = "Password to access the keystore" )
183+ parser .add_argument (
184+ "--sonar-scanner-keystore-password" ,
185+ "-Dsonar.scanner.keystorePassword" ,
186+ type = str ,
187+ help = "Password to access the keystore" ,
188+ )
149189
150- parser .add_argument ("--sonar-scanner-proxy-host" , type = str , help = "Proxy host" )
151- parser .add_argument ("--sonar-scanner-proxy-port" , type = int , help = "Proxy port" )
152- parser .add_argument ("--sonar-scanner-proxy-user" , type = str , help = "Proxy user" )
153- parser .add_argument ("--sonar-scanner-proxy-password" , type = str , help = "Proxy password" )
190+ parser .add_argument ("--sonar-scanner-proxy-host" , "-Dsonar.scanner.proxyHost" , type = str , help = "Proxy host" )
191+ parser .add_argument ("--sonar-scanner-proxy-port" , "-Dsonar.scanner.proxyPort" , type = int , help = "Proxy port" )
192+ parser .add_argument ("--sonar-scanner-proxy-user" , "-Dsonar.scanner.proxyUser" , type = str , help = "Proxy user" )
193+ parser .add_argument (
194+ "--sonar-scanner-proxy-password" , "-Dsonar.scanner.proxyPassword" , type = str , help = "Proxy password"
195+ )
154196
155197 parser .add_argument (
156198 "--sonar-project-base-dir" ,
199+ "-Dsonar.projectBaseDir" ,
157200 type = str ,
158201 help = "Directory containing the project to be analyzed. Default is the current directory" ,
159202 )
0 commit comments