github.com/anchore/syft@v1.4.2-0.20240516191711-1bec1fc5d397/cmd/syft/internal/options/relationships.go (about)

     1  package options
     2  
     3  import "github.com/anchore/fangs"
     4  
     5  var _ fangs.FieldDescriber = (*relationshipsConfig)(nil)
     6  
     7  type relationshipsConfig struct {
     8  	PackageFileOwnership        bool `mapstructure:"package-file-ownership" json:"package-file-ownership" yaml:"package-file-ownership"`
     9  	PackageFileOwnershipOverlap bool `mapstructure:"package-file-ownership-overlap" json:"package-file-ownership-overlap" yaml:"package-file-ownership-overlap"`
    10  }
    11  
    12  func defaultRelationshipsConfig() relationshipsConfig {
    13  	return relationshipsConfig{
    14  		PackageFileOwnership:        true,
    15  		PackageFileOwnershipOverlap: true,
    16  	}
    17  }
    18  
    19  func (r *relationshipsConfig) DescribeFields(descriptions fangs.FieldDescriptionSet) {
    20  	descriptions.Add(&r.PackageFileOwnership, "include package-to-file relationships that indicate which files are owned by which packages.")
    21  	descriptions.Add(&r.PackageFileOwnershipOverlap, "include package-to-package relationships that indicate one package is owned by another due to files claimed to be owned by one package are also evidence of another package's existence.")
    22  }