sonar
This module has been generated via dagger init and serves as a reference to basic module structure as you get started with Dagger.Two functions have been pre-created. You can modify, delete, or add to them, as needed. They demonstrate usage of arguments and return types using simple echo and grep commands. The functions can be called from the dagger CLI or from one of the SDKs.
The first line in this comment block is a short description line and the rest is a long description with more detail on the module's purpose or usage, if appropriate. All modules should have a short description.
Installation
dagger install github.com/cacidy-io/daggerverse/sonar@v0.1.0
Entrypoint
Return Type
Sonar
Example
dagger -m github.com/cacidy-io/daggerverse/sonar@7888f693614c115e6b0aad7513ae3f4640bfcc42 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() 🔗
Returns a container that echoes whatever string argument is provided
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
url | String | "https://sonarcloud.io" | sonar server url |
token | Secret ! | - | sonar auth token |
projectKey | String | - | sonar project key |
organization | String | - | sonar organization |
options | [String ! ] | - | sonar scanner options |
Example
dagger -m github.com/cacidy-io/daggerverse/sonar@7888f693614c115e6b0aad7513ae3f4640bfcc42 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)
}