Dagger
Search

golangci

No long description provided.

Installation

dagger install github.com/shykes/dagger/modules/golangci@dd171cfe5a4fe1a3f9235c607e08ed826735473a

Entrypoint

Return Type
Golangci
Example
dagger -m github.com/shykes/dagger/modules/golangci@dd171cfe5a4fe1a3f9235c607e08ed826735473a call \
func (m *myModule) example() *Golangci  {
	return dag.
			Golangci()
}
@function
def example() -> dag.Golangci:
	return (
		dag.golangci()
	)
@func()
example(): Golangci {
	return dag
		.golangci()
}

Types

Golangci 🔗

lint() 🔗

Lint a go codebase

Return Type
LintRun !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-The Go source directory to lint
pathString -Lint a specific path within the source directory
goModCacheCacheVolume -A cache volume to use for go module downloads
goBuildCacheCacheVolume -A cache volume to use for go build
Example
dagger -m github.com/shykes/dagger/modules/golangci@dd171cfe5a4fe1a3f9235c607e08ed826735473a call \
 lint --source DIR_PATH
func (m *myModule) example(source *Directory) *GolangciLintRun  {
	return dag.
			Golangci().
			Lint(source)
}
@function
def example(source: dagger.Directory) -> dag.GolangciLintRun:
	return (
		dag.golangci()
		.lint(source)
	)
@func()
example(source: Directory): GolangciLintRun {
	return dag
		.golangci()
		.lint(source)
}

LintRun 🔗

The result of running the GolangCI lint tool

issues() 🔗

Return Type
[Issue ! ] !
Example
dagger -m github.com/shykes/dagger/modules/golangci@dd171cfe5a4fe1a3f9235c607e08ed826735473a call \
 lint --source DIR_PATH \
 issues
func (m *myModule) example(source *Directory) []*GolangciIssue  {
	return dag.
			Golangci().
			Lint(source).
			Issues()
}
@function
def example(source: dagger.Directory) -> List[dag.GolangciIssue]:
	return (
		dag.golangci()
		.lint(source)
		.issues()
	)
@func()
example(source: Directory): GolangciIssue[] {
	return dag
		.golangci()
		.lint(source)
		.issues()
}

assert() 🔗

Return Type
Void !
Example
dagger -m github.com/shykes/dagger/modules/golangci@dd171cfe5a4fe1a3f9235c607e08ed826735473a call \
 lint --source DIR_PATH \
 assert
func (m *myModule) example(ctx context.Context, source *Directory)   {
	return dag.
			Golangci().
			Lint(source).
			Assert(ctx)
}
@function
async def example(source: dagger.Directory) -> None:
	return await (
		dag.golangci()
		.lint(source)
		.assert_()
	)
@func()
async example(source: Directory): Promise<void> {
	return dag
		.golangci()
		.lint(source)
		.assert()
}

errorCount() 🔗

Return Type
Integer !
Example
dagger -m github.com/shykes/dagger/modules/golangci@dd171cfe5a4fe1a3f9235c607e08ed826735473a call \
 lint --source DIR_PATH \
 error-count
func (m *myModule) example(ctx context.Context, source *Directory) int  {
	return dag.
			Golangci().
			Lint(source).
			ErrorCount(ctx)
}
@function
async def example(source: dagger.Directory) -> int:
	return await (
		dag.golangci()
		.lint(source)
		.error_count()
	)
@func()
async example(source: Directory): Promise<number> {
	return dag
		.golangci()
		.lint(source)
		.errorCount()
}

warningCount() 🔗

Return Type
Integer !
Example
dagger -m github.com/shykes/dagger/modules/golangci@dd171cfe5a4fe1a3f9235c607e08ed826735473a call \
 lint --source DIR_PATH \
 warning-count
func (m *myModule) example(ctx context.Context, source *Directory) int  {
	return dag.
			Golangci().
			Lint(source).
			WarningCount(ctx)
}
@function
async def example(source: dagger.Directory) -> int:
	return await (
		dag.golangci()
		.lint(source)
		.warning_count()
	)
@func()
async example(source: Directory): Promise<number> {
	return dag
		.golangci()
		.lint(source)
		.warningCount()
}

report() 🔗

Return a JSON report file for this run

Return Type
File !
Example
dagger -m github.com/shykes/dagger/modules/golangci@dd171cfe5a4fe1a3f9235c607e08ed826735473a call \
 lint --source DIR_PATH \
 report
func (m *myModule) example(source *Directory) *File  {
	return dag.
			Golangci().
			Lint(source).
			Report()
}
@function
def example(source: dagger.Directory) -> dagger.File:
	return (
		dag.golangci()
		.lint(source)
		.report()
	)
@func()
example(source: Directory): File {
	return dag
		.golangci()
		.lint(source)
		.report()
}

Issue 🔗

text() 🔗

Return Type
String !
Example
Function GolangciIssue.text is not accessible from the golangci module
Function GolangciIssue.text is not accessible from the golangci module
Function GolangciIssue.text is not accessible from the golangci module
Function GolangciIssue.text is not accessible from the golangci module

fromLinter() 🔗

Return Type
String !
Example
Function GolangciIssue.fromLinter is not accessible from the golangci module
Function GolangciIssue.fromLinter is not accessible from the golangci module
Function GolangciIssue.fromLinter is not accessible from the golangci module
Function GolangciIssue.fromLinter is not accessible from the golangci module

sourceLines() 🔗

Return Type
[String ! ] !
Example
Function GolangciIssue.sourceLines is not accessible from the golangci module
Function GolangciIssue.sourceLines is not accessible from the golangci module
Function GolangciIssue.sourceLines is not accessible from the golangci module
Function GolangciIssue.sourceLines is not accessible from the golangci module

replacement() 🔗

Return Type
Replacement !
Example
Function GolangciIssue.replacement is not accessible from the golangci module
Function GolangciIssue.replacement is not accessible from the golangci module
Function GolangciIssue.replacement is not accessible from the golangci module
Function GolangciIssue.replacement is not accessible from the golangci module

pos() 🔗

Return Type
Position !
Example
Function GolangciIssue.pos is not accessible from the golangci module
Function GolangciIssue.pos is not accessible from the golangci module
Function GolangciIssue.pos is not accessible from the golangci module
Function GolangciIssue.pos is not accessible from the golangci module

expectedNoLint() 🔗

Return Type
Boolean !
Example
Function GolangciIssue.expectedNoLint is not accessible from the golangci module
Function GolangciIssue.expectedNoLint is not accessible from the golangci module
Function GolangciIssue.expectedNoLint is not accessible from the golangci module
Function GolangciIssue.expectedNoLint is not accessible from the golangci module

severity() 🔗

Return Type
String !
Example
Function GolangciIssue.severity is not accessible from the golangci module
Function GolangciIssue.severity is not accessible from the golangci module
Function GolangciIssue.severity is not accessible from the golangci module
Function GolangciIssue.severity is not accessible from the golangci module

isError() 🔗

Return Type
Boolean !
Example
Function GolangciIssue.isError is not accessible from the golangci module
Function GolangciIssue.isError is not accessible from the golangci module
Function GolangciIssue.isError is not accessible from the golangci module
Function GolangciIssue.isError is not accessible from the golangci module

summary() 🔗

Return Type
String !
Example
Function GolangciIssue.summary is not accessible from the golangci module
Function GolangciIssue.summary is not accessible from the golangci module
Function GolangciIssue.summary is not accessible from the golangci module
Function GolangciIssue.summary is not accessible from the golangci module

Replacement 🔗

text() 🔗

Return Type
String !
Example
Function GolangciReplacement.text is not accessible from the golangci module
Function GolangciReplacement.text is not accessible from the golangci module
Function GolangciReplacement.text is not accessible from the golangci module
Function GolangciReplacement.text is not accessible from the golangci module

Position 🔗

filename() 🔗

Return Type
String !
Example
Function GolangciPosition.filename is not accessible from the golangci module
Function GolangciPosition.filename is not accessible from the golangci module
Function GolangciPosition.filename is not accessible from the golangci module
Function GolangciPosition.filename is not accessible from the golangci module

offset() 🔗

Return Type
Integer !
Example
Function GolangciPosition.offset is not accessible from the golangci module
Function GolangciPosition.offset is not accessible from the golangci module
Function GolangciPosition.offset is not accessible from the golangci module
Function GolangciPosition.offset is not accessible from the golangci module

line() 🔗

Return Type
Integer !
Example
Function GolangciPosition.line is not accessible from the golangci module
Function GolangciPosition.line is not accessible from the golangci module
Function GolangciPosition.line is not accessible from the golangci module
Function GolangciPosition.line is not accessible from the golangci module

column() 🔗

Return Type
Integer !
Example
Function GolangciPosition.column is not accessible from the golangci module
Function GolangciPosition.column is not accessible from the golangci module
Function GolangciPosition.column is not accessible from the golangci module
Function GolangciPosition.column is not accessible from the golangci module