From c19cf626abf2319a3cf0e2687cd4ee761425c962 Mon Sep 17 00:00:00 2001 From: luozexuan Date: Tue, 13 Aug 2024 00:08:04 +0800 Subject: [PATCH] chore: fix some comments (#3114) Signed-off-by: luozexuan --- DEVELOPING.md | 2 +- cmd/syft/internal/options/format.go | 2 +- internal/cache/README.md | 2 +- test/cli/cyclonedx_valid_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DEVELOPING.md b/DEVELOPING.md index 3d1e5ff18..5dd88e274 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -83,7 +83,7 @@ Syft's core library is implemented in the `syft` package and subpackages, where - the `syft` package contains a single function that can take a `source.Source` object and catalog it, producing an `sbom.SBOM` object - the `syft/format` package contains the ability to encode and decode SBOMs to and from different SBOM formats (such as SPDX and CycloneDX) -The `cmd` pacakge at the highest level execution flow wires up [`spf13/cobra`](https://github.com/spf13/cobra) commands for execution in the main application: +The `cmd` package at the highest level execution flow wires up [`spf13/cobra`](https://github.com/spf13/cobra) commands for execution in the main application: ```mermaid sequenceDiagram participant main as cmd/syft/main diff --git a/cmd/syft/internal/options/format.go b/cmd/syft/internal/options/format.go index 4ff1e9934..4540b5fee 100644 --- a/cmd/syft/internal/options/format.go +++ b/cmd/syft/internal/options/format.go @@ -50,7 +50,7 @@ if false, uses the syft-json output for templating (which follows the syft JSON Note: long term support for this option is not guaranteed (it may change or break at any time)`) - prettyDescription := `include space indention and newlines + prettyDescription := `include space indentation and newlines note: inherits default value from 'format.pretty' or 'false' if parent is unset` descriptions.Add(&o.SyftJSON.Pretty, prettyDescription) descriptions.Add(&o.SPDXJSON.Pretty, prettyDescription) diff --git a/internal/cache/README.md b/internal/cache/README.md index 174e03b9e..b24a6f934 100644 --- a/internal/cache/README.md +++ b/internal/cache/README.md @@ -1,6 +1,6 @@ # Caching -All caches are created from a global `manager`. By defaut this is a `bypassedCache`, which performs no caching. +All caches are created from a global `manager`. By default this is a `bypassedCache`, which performs no caching. One benefit of this is that tests don't need to worry about caching causing issues unless they explicitly need to test the cache and can opt-in using the `cache.TestCache(t)` helper. diff --git a/test/cli/cyclonedx_valid_test.go b/test/cli/cyclonedx_valid_test.go index 1feca08d9..49755f0bc 100644 --- a/test/cli/cyclonedx_valid_test.go +++ b/test/cli/cyclonedx_valid_test.go @@ -12,7 +12,7 @@ import ( "github.com/anchore/syft/syft/format/cyclonedxjson" ) -// We have schema validation mechanims in schema/cyclonedx/ +// We have schema validation mechanisms in schema/cyclonedx/ // This test allows us to double check that validation against the cyclonedx-cli tool func TestValidCycloneDX(t *testing.T) { imageFixture := func(t *testing.T) string {