mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-19 18:12:43 -05:00
Accept both sp and pp files as mod data extension . Closes#4089
This commit is contained in:
@@ -2,16 +2,15 @@ package constants
|
||||
|
||||
import "github.com/turbot/go-kit/helpers"
|
||||
|
||||
var ModDataExtensions = []string{".sp", "*.pp"}
|
||||
|
||||
const (
|
||||
PluginExtension = ".plugin"
|
||||
ConfigExtension = ".spc"
|
||||
SqlExtension = ".sql"
|
||||
MarkdownExtension = ".md"
|
||||
ModDataExtension = ".sp"
|
||||
VariablesExtension = ".spvars"
|
||||
AutoVariablesExtension = ".auto.spvars"
|
||||
JsonExtension = ".json"
|
||||
CsvExtension = ".csv"
|
||||
TextExtension = ".txt"
|
||||
SnapshotExtension = ".sps"
|
||||
TokenExtension = ".tptt"
|
||||
|
||||
@@ -234,7 +234,8 @@ func LoadModResourceNames(ctx context.Context, mod *modconfig.Mod, parseCtx *par
|
||||
// GetModFileExtensions returns list of all file extensions we care about
|
||||
// this will be the mod data extension, plus any registered extensions registered in fileToResourceMap
|
||||
func GetModFileExtensions() []string {
|
||||
return append(modconfig.RegisteredFileExtensions(), constants.ModDataExtension, constants.VariablesExtension)
|
||||
res := append(modconfig.RegisteredFileExtensions(), constants.ModDataExtensions...)
|
||||
return append(res, constants.VariablesExtension)
|
||||
}
|
||||
|
||||
// build list of all filepaths we need to parse/load the mod
|
||||
|
||||
@@ -383,7 +383,7 @@ func (w *Workspace) getParseContext(ctx context.Context) (*parse.ModParseContext
|
||||
Flags: w.listFlag,
|
||||
Exclude: w.exclusions,
|
||||
// only load .sp files
|
||||
Include: filehelpers.InclusionsFromExtensions([]string{constants.ModDataExtension}),
|
||||
Include: filehelpers.InclusionsFromExtensions(constants.ModDataExtensions),
|
||||
})
|
||||
|
||||
return parseCtx, nil
|
||||
|
||||
Reference in New Issue
Block a user