hey! looking for ways to improve this little function:
func (m *Project) LintShell(ctx context.Context, source *dagger.Directory) (string, error) {
return dag.Container().
From("shellcheck-alpine").
WithDirectory("/scripts", source, dagger.ContainerWithDirectoryOpts{Include: []string{"*.sh"}}).
WithWorkdir("/scripts").
WithExec([]string{"sh", "-c", "find . -name '*.sh' | xargs shellcheck"}).
Stdout(ctx)
}
here, id like source to be the root of my monorepo, but then be able in some way to select some subdirectories, rather than try to copy the whole monorepo and filter by *.sh.
is there a way to use the passed in source to template a string and select subdirs? for example,
$source/scripts, $source/ci, etc.