Skip to content

Commit

Permalink
fix: update incorrect comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Jul 17, 2024
1 parent 5799449 commit afe12b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/dependency/parser/dotnet/core_deps/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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)
}

Expand Down

0 comments on commit afe12b4

Please sign in to comment.