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
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
token | Secret ! | - | No description provided |
organization | String | - | No description provided |
projectKey | String | - | No description provided |
sources | String | - | 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)
}