Skip to content

Commit 84dcc54

Browse files
SCANPY-187 Add project-key argument alternative name to the sonar-project-key cli argument
1 parent aa51f25 commit 84dcc54

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/pysonar_scanner/configuration/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def __create_parser(cls):
7171
)
7272
parser.add_argument(
7373
"--sonar-project-key",
74+
"--project-key",
7475
"-Dsonar.projectKey",
7576
type=str,
7677
help="Key of the project that usually corresponds to the project name in SonarQube",

tests/unit/test_configuration_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def test_minimal_cli_args(self):
181181

182182
def test_alternative_cli_args(self):
183183
alternatives = [
184-
["-t", "myToken", "-v", "--sonar-project-key", "myProjectKey"],
184+
["-t", "myToken", "-v", "--project-key", "myProjectKey"],
185185
["--sonar-token", "myToken", "--sonar-verbose", "--sonar-project-key", "myProjectKey"],
186186
]
187187
for alternative in alternatives:

0 commit comments

Comments
 (0)