docs(cli): document --project-tags for snyk code test#6879
Open
apzuk3 wants to merge 2 commits into
Open
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. |
Contributor
|
This comment has been minimized.
This comment has been minimized.
PR Reviewer Guide 🔍
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.