Dagger
Search

pre-commit

Module for running pre-commit functions

Installation

dagger install github.com/mxdev88/daggerverse/pre-commit@bac74972ac3af5d53ecdb7d51a82cff5934f760f

Entrypoint

Return Type
PreCommit !
Example
dagger -m github.com/mxdev88/daggerverse/pre-commit@bac74972ac3af5d53ecdb7d51a82cff5934f760f call \
func (m *myModule) example() *PreCommit  {
	return dag.
			PreCommit()
}
@function
def example() -> dag.PreCommit:
	return (
		dag.pre_commit()
	)
@func()
example(): PreCommit {
	return dag
		.preCommit()
}

Types

PreCommit 🔗

base() 🔗

Build base environment

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
versionString !"3.8.0"No description provided
Example
dagger -m github.com/mxdev88/daggerverse/pre-commit@bac74972ac3af5d53ecdb7d51a82cff5934f760f call \
 base --version string
func (m *myModule) example(version string) *Container  {
	return dag.
			PreCommit().
			Base(version)
}
@function
def example(version: str) -> dagger.Container:
	return (
		dag.pre_commit()
		.base(version)
	)
@func()
example(version: string): Container {
	return dag
		.preCommit()
		.base(version)
}

run() 🔗

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-A directory.
versionString !"3.8.0"No description provided
Example
dagger -m github.com/mxdev88/daggerverse/pre-commit@bac74972ac3af5d53ecdb7d51a82cff5934f760f call \
 run --source DIR_PATH --version string
func (m *myModule) example(ctx context.Context, source *Directory, version string) string  {
	return dag.
			PreCommit().
			Run(ctx, source, version)
}
@function
async def example(source: dagger.Directory, version: str) -> str:
	return await (
		dag.pre_commit()
		.run(source, version)
	)
@func()
async example(source: Directory, version: string): Promise<string> {
	return dag
		.preCommit()
		.run(source, version)
}