mirror of
https://github.com/anchore/syft.git
synced 2025-11-20 01:43:17 +01:00
* normalize cataloger patterns Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * remove central reference for maven configurable Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
22 lines
964 B
Go
22 lines
964 B
Go
/*
|
|
Package haskell provides a concrete Cataloger implementation relating to packages within the Haskell language ecosystem.
|
|
*/
|
|
package haskell
|
|
|
|
import (
|
|
"github.com/anchore/syft/syft/pkg"
|
|
"github.com/anchore/syft/syft/pkg/cataloger/generic"
|
|
)
|
|
|
|
// TODO: it seems that the stack.yaml/stack.lock/cabal.project.freeze have different purposes and could have different installation intentions
|
|
// (some describe intent and are meant to be used by a tool to resolve more dependencies while others describe the actual installed state).
|
|
// This hints at splitting these into multiple catalogers, but for now we'll keep them together.
|
|
|
|
// NewHackageCataloger returns a new Haskell cataloger object.
|
|
func NewHackageCataloger() pkg.Cataloger {
|
|
return generic.NewCataloger("haskell-cataloger").
|
|
WithParserByGlobs(parseStackYaml, "**/stack.yaml").
|
|
WithParserByGlobs(parseStackLock, "**/stack.yaml.lock").
|
|
WithParserByGlobs(parseCabalFreeze, "**/cabal.project.freeze")
|
|
}
|