mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
remove prealloc nolint rule in catalogers
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
parent
d420368ba9
commit
929b78efbf
@ -73,7 +73,6 @@ func (pres *TablePresenter) Present(output io.Writer) error {
|
|||||||
|
|
||||||
func removeDuplicateRows(items [][]string) [][]string {
|
func removeDuplicateRows(items [][]string) [][]string {
|
||||||
seen := map[string][]string{}
|
seen := map[string][]string{}
|
||||||
// nolint:prealloc
|
|
||||||
var result [][]string
|
var result [][]string
|
||||||
|
|
||||||
for _, v := range items {
|
for _, v := range items {
|
||||||
|
|||||||
@ -30,7 +30,6 @@ func (c *PackageCataloger) Name() string {
|
|||||||
|
|
||||||
// Catalog is given an object to resolve file references and content, this function returns any discovered Packages after analyzing python egg and wheel installations.
|
// Catalog is given an object to resolve file references and content, this function returns any discovered Packages after analyzing python egg and wheel installations.
|
||||||
func (c *PackageCataloger) Catalog(resolver source.FileResolver) ([]pkg.Package, error) {
|
func (c *PackageCataloger) Catalog(resolver source.FileResolver) ([]pkg.Package, error) {
|
||||||
// nolint:prealloc
|
|
||||||
var fileMatches []source.Location
|
var fileMatches []source.Location
|
||||||
|
|
||||||
for _, glob := range []string{eggMetadataGlob, wheelMetadataGlob, eggFileMetadataGlob} {
|
for _, glob := range []string{eggMetadataGlob, wheelMetadataGlob, eggFileMetadataGlob} {
|
||||||
|
|||||||
@ -53,7 +53,6 @@ var postProcessors = map[string]postProcessor{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func processList(s string) []string {
|
func processList(s string) []string {
|
||||||
// nolint:prealloc
|
|
||||||
var results []string
|
var results []string
|
||||||
for _, item := range strings.Split(s, ",") {
|
for _, item := range strings.Split(s, ",") {
|
||||||
results = append(results, strings.Trim(item, "\" "))
|
results = append(results, strings.Trim(item, "\" "))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user