Dagger
Search

sonar

This module provides a function for analyzing code with sonar scanner

Installation

dagger install github.com/fluent-ci-templates/sonar-pipeline@v0.6.0

Entrypoint

Return Type
Sonar
Example
dagger -m github.com/fluent-ci-templates/sonar-pipeline@bb014ac1c2284b321a2d04c59778b953ab1c638f call \
func (m *myModule) example() *Sonar  {
	return dag.
			Sonar()
}
@function
def example() -> dag.Sonar:
	return (
		dag.sonar()
	)
@func()
example(): Sonar {
	return dag
		.sonar()
}

Types

Sonar 🔗

analyze() 🔗

Run sonar scanner

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
tokenSecret !-No description provided
organizationString -No description provided
projectKeyString -No description provided
sourcesString -No description provided
Example
dagger -m github.com/fluent-ci-templates/sonar-pipeline@bb014ac1c2284b321a2d04c59778b953ab1c638f call \
 analyze --src DIR_PATH --token env:MYSECRET
func (m *myModule) example(ctx context.Context, src *Directory, token *Secret) string  {
	return dag.
			Sonar().
			Analyze(ctx, src, token)
}
@function
async def example(src: dagger.Directory, token: dagger.Secret) -> str:
	return await (
		dag.sonar()
		.analyze(src, token)
	)
@func()
async example(src: Directory, token: Secret): Promise<string> {
	return dag
		.sonar()
		.analyze(src, token)
}