sonar
This module provides a function for analyzing code with sonar scanner
Installation
dagger install github.com/fluent-ci-templates/sonar-pipeline@v0.5.0
Entrypoint
Return Type
Sonar
Example
dagger -m github.com/fluent-ci-templates/sonar-pipeline@5255eb7c1bc5283c00cba795644b5d09c6207ea8 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@5255eb7c1bc5283c00cba795644b5d09c6207ea8 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)
}