docs(cli): document --project-tags for snyk code test - #6879
Conversation
Adds a `--project-tags` option section to the `snyk code test` help documentation in help/cli-commands/code-test.md, matching the wording and structure already used in iac-test.md, monitor.md, and container-monitor.md. The flag is implemented in code-client-go and is wired into the Code workflow, but was not yet surfaced in `snyk code test --help` or the CLI command docs. Help is rendered directly from this markdown file, so no other source changes are required.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
This comment has been minimized.
This comment has been minimized.
PR Reviewer Guide 🔍
|
|
Your PR has not had any activity for 30 days. In 2 days I'll close it. Make some activity to remove this. |
|
|
||
| `snyk code test --report --target-reference="$(git describe --tags --abbrev=0)"` | ||
|
|
||
| ### `--project-tags=<TAG>[,<TAG>]...>` |
There was a problem hiding this comment.
Syntax error: Extra > character before the closing backtick. The line currently reads --project-tags=<TAG>[,<TAG>]...> but should be --project-tags=<TAG>[,<TAG>]... (without the trailing >). This will render incorrectly in the help documentation.
### `--project-tags=<TAG>[,<TAG>]...`| ### `--project-tags=<TAG>[,<TAG>]...>` | |
| ### `--project-tags=<TAG>[,<TAG>]...` | |
Spotted by Graphite
Is this helpful? React 👍 or 👎 to let us know.
|
Your PR has not had any activity for 30 days. In 2 days I'll close it. Make some activity to remove this. |
|
Your PR has now been stale for 2 days. I'm closing it. |
What does this PR do?
Adds a
--project-tagsoption section to thesnyk code testhelp documentation incli/help/cli-commands/code-test.md, matching the wording and structure already used iniac-test.md,monitor.md, andcontainer-monitor.md.The flag is implemented in
code-client-goand wired into the Code workflow (code-client-go/pkg/code/code.goregisters--project-tags,internal/commands/code_workflow/native_workflow.gocallsGenerateProjectTagsand forwards them viacodeclient.WithProjectTags), but was not yet surfaced insnyk code test --helpor the CLI command docs.snyk code test --helpis rendered directly from this markdown bycli/src/cli/commands/help/index.ts, so no source code changes are required here.Where should the reviewer start?
cli/help/cli-commands/code-test.md- the new### --project-tags=<TAG>[,<TAG>]...section, placed between--target-referenceand--remote-repo-urlto sit with the other project metadata / report options.cli/help/cli-commands/iac-test.md(which already documents this flag with--report).How should this be manually tested?
Expected: the new section appears, with the example
--project-tags=department=finance,team=alphaand the clear-by-empty-value note.Functional behaviour of the flag is covered by existing tests in
code-client-go:code-client-go/internal/commands/code_workflow/project_tags_test.go- parsing / validation of the flag valuecode-client-go/internal/analysis/analysis_test.go::TestAnalysis_RunTest_WithProjectTags- tags forwarded to the test APIWhat's the product update that needs to be communicated to CLI users?
None for this PR specifically - this only documents an already-implemented flag. The product-facing announcement belongs with the PR that added
--project-tagssupport tosnyk code test.Risk assessment
Low - markdown-only change, no code paths affected, prettier passes, no test or behaviour changes.
Pull Request Submission Checklist
code-client-golinked under "How should this be manually tested?"snyk/user-docsweekly viasync-cli-help-to-user-docs.yml. Without the companion user-docs PR, this change would be reverted by the next sync.--project-tagssupport to Code.