From afe12b40e146d9b92c663eeeac14e46168a2286c Mon Sep 17 00:00:00 2001 From: DmitriyLewen Date: Wed, 17 Jul 2024 13:33:20 +0600 Subject: [PATCH] fix: update incorrect comments --- pkg/dependency/parser/dotnet/core_deps/parse.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/dependency/parser/dotnet/core_deps/parse.go b/pkg/dependency/parser/dotnet/core_deps/parse.go index 3ab171e25b14..7fc8d3df5d5e 100644 --- a/pkg/dependency/parser/dotnet/core_deps/parse.go +++ b/pkg/dependency/parser/dotnet/core_deps/parse.go @@ -103,7 +103,7 @@ func (p *Parser) Parse(r xio.ReadSeekerAt) ([]ftypes.Package, []ftypes.Dependenc return pkgs, nil, nil } -// isRuntimeLibrary returns true if library doesn't contain `runtime`, `runtimeTarget` and `native` sections. +// isRuntimeLibrary returns true if library contains `runtime`, `runtimeTarget` or `native` sections, or if the library is missing from `targetLibs`. // See https://github.com/aquasecurity/trivy/discussions/4282#discussioncomment-8830365 for more details. func (p *Parser) isRuntimeLibrary(targetLibs map[string]TargetLib, library string) bool { lib, ok := targetLibs[library] @@ -115,7 +115,7 @@ func (p *Parser) isRuntimeLibrary(targetLibs map[string]TargetLib, library strin }) return true } - // Check that `runtime`, `runtimeTarget` and `native` sections are empty + // Check that `runtime`, `runtimeTarget` and `native` sections are not empty return !lo.IsEmpty(lib) }