Dagger
Search

sonar

Check for code quality with static anaylsis scanning.

Installation

dagger install github.com/cacidy-io/daggerverse/sonar@v0.1.0

Entrypoint

Return Type
Sonar
Example
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() 🔗

Returns a container that echoes whatever string argument is provided

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-No description provided
urlString "https://sonarcloud.io"sonar server url
tokenSecret !-sonar auth token
projectKeyString -sonar project key
organizationString -sonar organization
options[String ! ] -sonar scanner options
Example
dagger -m github.com/cacidy-io/daggerverse/sonar@d0d9ecbd93ca925e4296f3dbaaafc4556a4c3a6e call \
 analyze --source DIR_PATH --token env:MYSECRET
func (m *myModule) example(ctx context.Context, source *Directory, token *Secret) string  {
	return dag.
			Sonar().
			Analyze(ctx, source, token)
}
@function
async def example(source: dagger.Directory, token: dagger.Secret) -> str:
	return await (
		dag.sonar()
		.analyze(source, token)
	)
@func()
async example(source: Directory, token: Secret): Promise<string> {
	return dag
		.sonar()
		.analyze(source, token)
}