docs: fix stale commands in binary cataloger README#5047
Open
alliasgher wants to merge 1 commit into
Open
Conversation
Update the binary classifier cataloger developer README to match the current workflow: - Testing section used the non-existent flag -must-use-full-binaries against .../testdata/...; the real flag is -must-use-original-binaries and Test_Cataloger_PositiveCases lives in the binary package. Fix the command and add a single-fixture variant. - Point add-snippet references at the make target and note the (Y/n/q) prompt requires y to write the snippet. - Fix the test file name (classifier_cataloger_test.go) and document the go generate ./internal/capabilities step for new classifiers. Fixes anchore#4510 Signed-off-by: alliasgher <alliasgher123@gmail.com>
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.
Description
The binary classifier cataloger developer README (
syft/pkg/cataloger/binary/README.md) documents several commands that no longer match the code:go test -must-use-full-binaries ./syft/pkg/cataloger/binary/testdata/..., but the flag is defined as-must-use-original-binaries(inclassifier_cataloger_test.go) andTest_Cataloger_PositiveCaseslives in thebinarypackage, not undertestdata/. Fixed the command and added a single-fixture variant.add-snippetinvocation. Replaced the stalego run ./manager add-snippetreferences with themake add-snippettarget, and noted that the(Y/n/q)prompt requiresyto write the snippet.../cataloger_test.go; the test actually lives in../classifier_cataloger_test.go.go generate ./internal/capabilitiesstep (run from the repo root, commit the regeneratedcapabilities.yaml) for when a new classifier is added.Commands were verified against
main(the-run Test_Cataloger_PositiveCases/<name> -must-use-original-binariesform runs the expected cases; the flag and file paths were checked in the source).Fixes #4510
Type of change