ruff
No long description provided.
Installation
dagger install github.com/dagger/dagger/modules/ruff@11d93c8340854da72e79c5a56445d511ebf82a5aEntrypoint
Return Type
RuffExample
dagger -m github.com/dagger/dagger/modules/ruff@11d93c8340854da72e79c5a56445d511ebf82a5a call \
func (m *MyModule) Example() *dagger.Ruff  {
	return dag.
			Ruff()
}@function
def example() -> dagger.Ruff:
	return (
		dag.ruff()
	)@func()
example(): Ruff {
	return dag
		.ruff()
}Types
Ruff 🔗
Ruff is a fast Python linter implemented in Rust
lint() 🔗
Lint a Python codebase
Return Type
LintRun !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| source | Directory ! | - | The Python source directory to lint | 
Example
dagger -m github.com/dagger/dagger/modules/ruff@11d93c8340854da72e79c5a56445d511ebf82a5a call \
 lint --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.RuffLintRun  {
	return dag.
			Ruff().
			Lint(source)
}@function
def example(source: dagger.Directory) -> dagger.RuffLintRun:
	return (
		dag.ruff()
		.lint(source)
	)@func()
example(source: Directory): RuffLintRun {
	return dag
		.ruff()
		.lint(source)
}LintRun 🔗
The result of running the Ruff lint tool
report() 🔗
Return a JSON report file for this run
Return Type
File !Example
dagger -m github.com/dagger/dagger/modules/ruff@11d93c8340854da72e79c5a56445d511ebf82a5a call \
 lint --source DIR_PATH \
 reportfunc (m *MyModule) Example(source *dagger.Directory) *dagger.File  {
	return dag.
			Ruff().
			Lint(source).
			Report()
}@function
def example(source: dagger.Directory) -> dagger.File:
	return (
		dag.ruff()
		.lint(source)
		.report()
	)@func()
example(source: Directory): File {
	return dag
		.ruff()
		.lint(source)
		.report()
}issues() 🔗
Return a list of issues produced by the lint run
Return Type
[Issue ! ] !Example
dagger -m github.com/dagger/dagger/modules/ruff@11d93c8340854da72e79c5a56445d511ebf82a5a call \
 lint --source DIR_PATH \
 issuesfunc (m *MyModule) Example(source *dagger.Directory) []*dagger.RuffIssue  {
	return dag.
			Ruff().
			Lint(source).
			Issues()
}@function
def example(source: dagger.Directory) -> List[dagger.RuffIssue]:
	return (
		dag.ruff()
		.lint(source)
		.issues()
	)@func()
example(source: Directory): RuffIssue[] {
	return dag
		.ruff()
		.lint(source)
		.issues()
}assert() 🔗
Return an error if the lint run reported issues of severity “error”
Return Type
Void !Example
dagger -m github.com/dagger/dagger/modules/ruff@11d93c8340854da72e79c5a56445d511ebf82a5a call \
 lint --source DIR_PATH \
 assertfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory)   {
	return dag.
			Ruff().
			Lint(source).
			Assert(ctx)
}@function
async def example(source: dagger.Directory) -> None:
	return await (
		dag.ruff()
		.lint(source)
		.assert_()
	)@func()
async example(source: Directory): Promise<void> {
	return dag
		.ruff()
		.lint(source)
		.assert()
}summary() 🔗
Return a text summary of the lint run
Return Type
String !Example
dagger -m github.com/dagger/dagger/modules/ruff@11d93c8340854da72e79c5a56445d511ebf82a5a call \
 lint --source DIR_PATH \
 summaryfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory) string  {
	return dag.
			Ruff().
			Lint(source).
			Summary(ctx)
}@function
async def example(source: dagger.Directory) -> str:
	return await (
		dag.ruff()
		.lint(source)
		.summary()
	)@func()
async example(source: Directory): Promise<string> {
	return dag
		.ruff()
		.lint(source)
		.summary()
}errorCount() 🔗
Return the number of linting errors reported by this run
Return Type
Integer !Example
dagger -m github.com/dagger/dagger/modules/ruff@11d93c8340854da72e79c5a56445d511ebf82a5a call \
 lint --source DIR_PATH \
 error-countfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory) int  {
	return dag.
			Ruff().
			Lint(source).
			ErrorCount(ctx)
}@function
async def example(source: dagger.Directory) -> int:
	return await (
		dag.ruff()
		.lint(source)
		.error_count()
	)@func()
async example(source: Directory): Promise<number> {
	return dag
		.ruff()
		.lint(source)
		.errorCount()
}warningCount() 🔗
Return the number of non-error linting issues reported by this run
Return Type
Integer !Example
dagger -m github.com/dagger/dagger/modules/ruff@11d93c8340854da72e79c5a56445d511ebf82a5a call \
 lint --source DIR_PATH \
 warning-countfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory) int  {
	return dag.
			Ruff().
			Lint(source).
			WarningCount(ctx)
}@function
async def example(source: dagger.Directory) -> int:
	return await (
		dag.ruff()
		.lint(source)
		.warning_count()
	)@func()
async example(source: Directory): Promise<number> {
	return dag
		.ruff()
		.lint(source)
		.warningCount()
}Issue 🔗
An individual issue in a Ruff lint report
cell() 🔗
Return Type
String Example
Function RuffIssue.cell is not accessible from the ruff moduleFunction RuffIssue.cell is not accessible from the ruff moduleFunction RuffIssue.cell is not accessible from the ruff moduleFunction RuffIssue.cell is not accessible from the ruff modulecode() 🔗
Return Type
String !Example
Function RuffIssue.code is not accessible from the ruff moduleFunction RuffIssue.code is not accessible from the ruff moduleFunction RuffIssue.code is not accessible from the ruff moduleFunction RuffIssue.code is not accessible from the ruff moduleendLocation() 🔗
Return Type
Location !Example
Function RuffIssue.endLocation is not accessible from the ruff moduleFunction RuffIssue.endLocation is not accessible from the ruff moduleFunction RuffIssue.endLocation is not accessible from the ruff moduleFunction RuffIssue.endLocation is not accessible from the ruff modulefix() 🔗
Return Type
Fix !Example
Function RuffIssue.fix is not accessible from the ruff moduleFunction RuffIssue.fix is not accessible from the ruff moduleFunction RuffIssue.fix is not accessible from the ruff moduleFunction RuffIssue.fix is not accessible from the ruff modulelocation() 🔗
Return Type
Location !Example
Function RuffIssue.location is not accessible from the ruff moduleFunction RuffIssue.location is not accessible from the ruff moduleFunction RuffIssue.location is not accessible from the ruff moduleFunction RuffIssue.location is not accessible from the ruff modulemessage() 🔗
Return Type
String !Example
Function RuffIssue.message is not accessible from the ruff moduleFunction RuffIssue.message is not accessible from the ruff moduleFunction RuffIssue.message is not accessible from the ruff moduleFunction RuffIssue.message is not accessible from the ruff modulenoqaRow() 🔗
Return Type
Integer !Example
Function RuffIssue.noqaRow is not accessible from the ruff moduleFunction RuffIssue.noqaRow is not accessible from the ruff moduleFunction RuffIssue.noqaRow is not accessible from the ruff moduleFunction RuffIssue.noqaRow is not accessible from the ruff moduleurl() 🔗
Return Type
String !Example
Function RuffIssue.url is not accessible from the ruff moduleFunction RuffIssue.url is not accessible from the ruff moduleFunction RuffIssue.url is not accessible from the ruff moduleFunction RuffIssue.url is not accessible from the ruff moduleisError() 🔗
Return true if this linting issue is considered an error Note: this always returns true, because ruff doesn’t have a concept of issue severity
Return Type
Boolean !Example
Function RuffIssue.isError is not accessible from the ruff moduleFunction RuffIssue.isError is not accessible from the ruff moduleFunction RuffIssue.isError is not accessible from the ruff moduleFunction RuffIssue.isError is not accessible from the ruff modulefilename() 🔗
Return Type
String !Example
Function RuffIssue.filename is not accessible from the ruff moduleFunction RuffIssue.filename is not accessible from the ruff moduleFunction RuffIssue.filename is not accessible from the ruff moduleFunction RuffIssue.filename is not accessible from the ruff modulesummary() 🔗
Return Type
String !Example
Function RuffIssue.summary is not accessible from the ruff moduleFunction RuffIssue.summary is not accessible from the ruff moduleFunction RuffIssue.summary is not accessible from the ruff moduleFunction RuffIssue.summary is not accessible from the ruff moduleLocation 🔗
column() 🔗
Return Type
Integer !Example
Function RuffLocation.column is not accessible from the ruff moduleFunction RuffLocation.column is not accessible from the ruff moduleFunction RuffLocation.column is not accessible from the ruff moduleFunction RuffLocation.column is not accessible from the ruff modulerow() 🔗
Return Type
Integer !Example
Function RuffLocation.row is not accessible from the ruff moduleFunction RuffLocation.row is not accessible from the ruff moduleFunction RuffLocation.row is not accessible from the ruff moduleFunction RuffLocation.row is not accessible from the ruff moduleFix 🔗
applicability() 🔗
Return Type
String !Example
Function RuffFix.applicability is not accessible from the ruff moduleFunction RuffFix.applicability is not accessible from the ruff moduleFunction RuffFix.applicability is not accessible from the ruff moduleFunction RuffFix.applicability is not accessible from the ruff moduleedits() 🔗
Return Type
[Edit ! ] !Example
Function RuffFix.edits is not accessible from the ruff moduleFunction RuffFix.edits is not accessible from the ruff moduleFunction RuffFix.edits is not accessible from the ruff moduleFunction RuffFix.edits is not accessible from the ruff modulemessage() 🔗
Return Type
String !Example
Function RuffFix.message is not accessible from the ruff moduleFunction RuffFix.message is not accessible from the ruff moduleFunction RuffFix.message is not accessible from the ruff moduleFunction RuffFix.message is not accessible from the ruff moduleEdit 🔗
content() 🔗
Return Type
String !Example
Function RuffEdit.content is not accessible from the ruff moduleFunction RuffEdit.content is not accessible from the ruff moduleFunction RuffEdit.content is not accessible from the ruff moduleFunction RuffEdit.content is not accessible from the ruff moduleendLocation() 🔗
Return Type
Location !Example
Function RuffEdit.endLocation is not accessible from the ruff moduleFunction RuffEdit.endLocation is not accessible from the ruff moduleFunction RuffEdit.endLocation is not accessible from the ruff moduleFunction RuffEdit.endLocation is not accessible from the ruff modulelocation() 🔗
Return Type
Location !Example
Function RuffEdit.location is not accessible from the ruff moduleFunction RuffEdit.location is not accessible from the ruff moduleFunction RuffEdit.location is not accessible from the ruff moduleFunction RuffEdit.location is not accessible from the ruff module