@@ -44,116 +44,159 @@ def __parse_cli_args(cls) -> argparse.Namespace:
44
44
"-t" ,
45
45
"--token" ,
46
46
"--sonar-token" ,
47
+ "-Dsonar.token" ,
47
48
type = str ,
48
49
help = "Token used to authenticate against the SonarQube Server or SonarQube Cloud" ,
49
50
)
50
51
parser .add_argument (
51
52
"--sonar-project-key" ,
53
+ "-Dsonar.projectKey" ,
52
54
type = str ,
53
55
help = "Key of the project that usually corresponds to the project name in SonarQube" ,
54
56
)
55
57
56
58
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" ,
58
66
)
59
67
60
68
parser .add_argument (
61
69
"--sonar-host-url" ,
70
+ "-Dsonar.host.url" ,
62
71
type = str ,
63
72
help = "SonarQube Server base URL. For example, http://localhost:9000 for a local instance of SonarQube Server" ,
64
73
)
65
74
parser .add_argument (
66
75
"--sonar-region" ,
76
+ "-Dsonar.region" ,
67
77
type = str ,
68
78
choices = ["us" ],
69
79
help = "The region to contact, only for SonarQube Cloud" ,
70
80
)
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
+ )
72
84
73
85
parser .add_argument (
74
86
"--sonar-scanner-cloud-url" ,
87
+ "-Dsonar.scanner.cloudUrl" ,
75
88
type = str ,
76
89
help = "SonarQube Cloud base URL, https://sonarcloud.io for example" ,
77
90
)
78
91
parser .add_argument (
79
92
"--sonar-scanner-api-url" ,
93
+ "-Dsonar.scanner.apiUrl" ,
80
94
type = str ,
81
95
help = "Base URL for all REST-compliant API calls, https://api.sonarcloud.io for example" ,
82
96
)
83
97
parser .add_argument (
84
98
"--sonar-scanner-os" ,
99
+ "-Dsonar.scanner.os" ,
85
100
type = str ,
86
101
choices = ["windows" , "linux" , "macos" , "alpine" ],
87
102
help = "OS running the scanner" ,
88
103
)
89
104
parser .add_argument (
90
105
"--sonar-scanner-arch" ,
106
+ "-Dsonar.scanner.arch" ,
91
107
type = str ,
92
108
choices = ["x64" , "aarch64" ],
93
109
help = "Architecture on which the scanner will be running" ,
94
110
)
95
111
96
112
parser .add_argument (
97
113
"--skip-jre-provisioning" ,
114
+ "-Dsonar.scanner.skipJreProvisioning" ,
98
115
action = "store_true" ,
99
116
default = None ,
100
117
help = "If provided, the provisioning of the JRE will be skipped" ,
101
118
)
102
119
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" ,
104
124
)
105
125
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" ,
107
130
)
108
131
109
132
parser .add_argument (
110
133
"--sonar-scanner-internal-dump-to-file" ,
134
+ "-Dsonar.scanner.internal.dumpToFile" ,
111
135
type = str ,
112
136
help = "Filename where the input to the scanner engine will be dumped. Useful for debugging" ,
113
137
)
114
138
parser .add_argument (
115
139
"--sonar-scanner-internal-sq-version" ,
140
+ "-Dsonar.scanner.internal.sqVersion" ,
116
141
type = str ,
117
142
help = "Emulate the result of the call to get SQ server version. Useful for debugging with --sonar-scanner-internal-dump-to-file" ,
118
143
)
119
144
120
145
parser .add_argument (
121
146
"--sonar-scanner-connect-timeout" ,
147
+ "-Dsonar.scanner.connectTimeout" ,
122
148
type = int ,
123
149
help = "Time period to establish connections with the server (in seconds)" ,
124
150
)
125
151
parser .add_argument (
126
152
"--sonar-scanner-socket-timeout" ,
153
+ "-Dsonar.scanner.socketTimeout" ,
127
154
type = int ,
128
155
help = "Maximum time of inactivity between two data packets when exchanging data with the server (in seconds)" ,
129
156
)
130
157
parser .add_argument (
131
158
"--sonar-scanner-response-timeout" ,
159
+ "-Dsonar.scanner.responseTimeout" ,
132
160
type = int ,
133
161
help = "Time period required to process an HTTP call: from sending a request to receiving a response (in seconds)" ,
134
162
)
135
163
136
164
parser .add_argument (
137
165
"--sonar-scanner-truststore-path" ,
166
+ "-Dsonar.scanner.truststorePath" ,
138
167
type = str ,
139
168
help = "Path to the keystore containing trusted server certificates, used by the Scanner in addition to OS and the built-in certificates" ,
140
169
)
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
+ )
142
176
143
177
parser .add_argument (
144
178
"--sonar-scanner-keystore-path" ,
179
+ "-Dsonar.scanner.keystorePath" ,
145
180
type = str ,
146
181
help = "Path to the keystore containing the client certificates used by the scanner. By default, <sonar.userHome>/ssl/keystore.p12" ,
147
182
)
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
+ )
149
189
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
+ )
154
196
155
197
parser .add_argument (
156
198
"--sonar-project-base-dir" ,
199
+ "-Dsonar.projectBaseDir" ,
157
200
type = str ,
158
201
help = "Directory containing the project to be analyzed. Default is the current directory" ,
159
202
)
0 commit comments