Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLI_ARGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
| ------ | ----------- |
| `--sonar-project-base-dir`, `-Dsonar.projectBaseDir` | Directory containing the project to be analyzed. Default is the current directory |
| `--sonar-project-description`, `-Dsonar.projectDescription` | Description of the project |
| `--sonar-project-key`, `-Dsonar.projectKey` | Key of the project that usually corresponds to the project name in SonarQube |
| `--sonar-project-key`, `--project-key`, `-Dsonar.projectKey` | Key of the project that usually corresponds to the project name in SonarQube |
| `--sonar-project-name`, `-Dsonar.projectName` | Name of the project in SonarQube |
| `--sonar-project-version`, `-Dsonar.projectVersion` | Version of the project |
| `--sonar-sources`, `-Dsonar.sources` | The analysis scope for main source code (non-test code) in the project |
Expand Down
1 change: 1 addition & 0 deletions src/pysonar_scanner/configuration/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def __create_parser(cls):
)
parser.add_argument(
"--sonar-project-key",
"--project-key",
"-Dsonar.projectKey",
type=str,
help="Key of the project that usually corresponds to the project name in SonarQube",
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_configuration_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def test_minimal_cli_args(self):

def test_alternative_cli_args(self):
alternatives = [
["-t", "myToken", "-v", "--sonar-project-key", "myProjectKey"],
["-t", "myToken", "-v", "--project-key", "myProjectKey"],
["--sonar-token", "myToken", "--sonar-verbose", "--sonar-project-key", "myProjectKey"],
]
for alternative in alternatives:
Expand Down