Skip to content

Commit 7affbc8

Browse files
Document usethis show sonarqube more thoroughly (#1562)
* Initial plan * Initial plan for documenting usethis show sonarqube Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/6eb5954c-e7c1-4b82-a6a7-1c4e88071a68 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com> * docs: document usethis show sonarqube behavior more thoroughly Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/6eb5954c-e7c1-4b82-a6a7-1c4e88071a68 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com> Co-authored-by: Nathan McDougall <nathan.j.mcdougall@gmail.com>
1 parent 41fe75a commit 7affbc8

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

docs/cli/reference.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,24 @@ Currently supported subcommands:
456456

457457
- `usethis show backend` to show the inferred project manager backend, e.g. 'uv' or 'none'. This is the default backend used, i.e. when `--backend=auto` is specified.
458458
- `usethis show name` to show the name of the project.
459-
- `usethis show sonarqube` to show appropriate contents of a `sonar-projects.properties` file for SonarQube analysis.
459+
- `usethis show sonarqube` to show appropriate contents of a `sonar-project.properties` file for SonarQube analysis.
460+
461+
### `usethis show sonarqube`
462+
463+
Show the contents of a `sonar-project.properties` file for SonarQube analysis.
464+
465+
If a `sonar-project.properties` file already exists in the project root, its contents are returned as-is. In this case, the `--project-key` option and `tool.usethis.sonarqube.project-key` in `pyproject.toml` are both ignored.
466+
467+
If no `sonar-project.properties` file exists, the contents are constructed from `pyproject.toml` configuration. In this case, a project key is required:
468+
469+
- If `--project-key` is provided, it is used.
470+
- Otherwise, `tool.usethis.sonarqube.project-key` from `pyproject.toml` is used.
471+
472+
Additional configuration in `pyproject.toml`:
473+
474+
- `tool.usethis.sonarqube.verbose` (bool, default `false`) — sets `sonar.verbose`.
475+
- `tool.usethis.sonarqube.exclusions` (list of strings, default `[]`) — sets `sonar.exclusions`.
476+
- `tool.coverage.xml.output` (string, required) — sets `sonar.python.coverage.reportPaths`.
460477

461478
## `usethis browse pypi <package>`
462479

0 commit comments

Comments
 (0)