editorconfig
This module wraps the editorconfig-checker tool to ensure codebases adhereto formatting rules defined in their .editorconfig files. It can be easily
integrated into local developer workflows or CI/CD pipelines (such as GitHub Actions).
Installation
dagger install github.com/softwaredevelop/daggerverse/editorconfig@debe16fa3eaa96ca3776939caee90d3fc6c53a89Entrypoint
Return Type
Editorconfig !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| image | String | - | Custom image reference in "repository:tag" format to use as a base container. |
Example
dagger -m github.com/softwaredevelop/daggerverse/editorconfig@debe16fa3eaa96ca3776939caee90d3fc6c53a89 call \
func (m *MyModule) Example() *dagger.Editorconfig {
return dag.
Editorconfig()
}@function
def example() -> dagger.Editorconfig:
return (
dag.editorconfig()
)@func()
example(): Editorconfig {
return dag
.editorconfig()
}Types
Editorconfig 🔗
Editorconfig provides functions to run editorconfig checks.
check() 🔗
Check runs the editorconfig-checker command on the target directory. It returns the container allowing callers to chain methods such as stderr, stdout, or sync.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Source directory to validate. |
| excludeDirectoryPattern | String | ".git" | A relative directory path to exclude from the check (defaults to “.git”). |
Example
dagger -m github.com/softwaredevelop/daggerverse/editorconfig@debe16fa3eaa96ca3776939caee90d3fc6c53a89 call \
check --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container {
return dag.
Editorconfig().
Check(source)
}@function
def example(source: dagger.Directory) -> dagger.Container:
return (
dag.editorconfig()
.check(source)
)@func()
example(source: Directory): Container {
return dag
.editorconfig()
.check(source)
}