ruff
No long description provided.
Installation
dagger install github.com/felipepimentel/daggerverse/essentials/ruff@v0.0.0
Entrypoint
Return Type
Ruff
Example
dagger -m github.com/felipepimentel/daggerverse/essentials/ruff@897f772fd76fa69f1bba8d284b0becb1053353dc call \
func (m *myModule) example() *Ruff {
return dag.
Ruff()
}
@function
def example() -> dag.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/felipepimentel/daggerverse/essentials/ruff@897f772fd76fa69f1bba8d284b0becb1053353dc call \
lint --source DIR_PATH
func (m *myModule) example(source *Directory) *RuffLintRun {
return dag.
Ruff().
Lint(source)
}
@function
def example(source: dagger.Directory) -> dag.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/felipepimentel/daggerverse/essentials/ruff@897f772fd76fa69f1bba8d284b0becb1053353dc call \
lint --source DIR_PATH \
report
func (m *myModule) example(source *Directory) *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/felipepimentel/daggerverse/essentials/ruff@897f772fd76fa69f1bba8d284b0becb1053353dc call \
lint --source DIR_PATH \
issues
func (m *myModule) example(source *Directory) []*RuffIssue {
return dag.
Ruff().
Lint(source).
Issues()
}
@function
def example(source: dagger.Directory) -> List[dag.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/felipepimentel/daggerverse/essentials/ruff@897f772fd76fa69f1bba8d284b0becb1053353dc call \
lint --source DIR_PATH \
assert
func (m *myModule) example(ctx context.Context, source *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/felipepimentel/daggerverse/essentials/ruff@897f772fd76fa69f1bba8d284b0becb1053353dc call \
lint --source DIR_PATH \
summary
func (m *myModule) example(ctx context.Context, source *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/felipepimentel/daggerverse/essentials/ruff@897f772fd76fa69f1bba8d284b0becb1053353dc call \
lint --source DIR_PATH \
error-count
func (m *myModule) example(ctx context.Context, source *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/felipepimentel/daggerverse/essentials/ruff@897f772fd76fa69f1bba8d284b0becb1053353dc call \
lint --source DIR_PATH \
warning-count
func (m *myModule) example(ctx context.Context, source *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 module
Function RuffIssue.cell is not accessible from the ruff module
Function RuffIssue.cell is not accessible from the ruff module
Function RuffIssue.cell is not accessible from the ruff module
code() 🔗
Return Type
String !
Example
Function RuffIssue.code is not accessible from the ruff module
Function RuffIssue.code is not accessible from the ruff module
Function RuffIssue.code is not accessible from the ruff module
Function RuffIssue.code is not accessible from the ruff module
endLocation() 🔗
Return Type
Location !
Example
Function RuffIssue.endLocation is not accessible from the ruff module
Function RuffIssue.endLocation is not accessible from the ruff module
Function RuffIssue.endLocation is not accessible from the ruff module
Function RuffIssue.endLocation is not accessible from the ruff module
fix() 🔗
Return Type
Fix !
Example
Function RuffIssue.fix is not accessible from the ruff module
Function RuffIssue.fix is not accessible from the ruff module
Function RuffIssue.fix is not accessible from the ruff module
Function RuffIssue.fix is not accessible from the ruff module
location() 🔗
Return Type
Location !
Example
Function RuffIssue.location is not accessible from the ruff module
Function RuffIssue.location is not accessible from the ruff module
Function RuffIssue.location is not accessible from the ruff module
Function RuffIssue.location is not accessible from the ruff module
message() 🔗
Return Type
String !
Example
Function RuffIssue.message is not accessible from the ruff module
Function RuffIssue.message is not accessible from the ruff module
Function RuffIssue.message is not accessible from the ruff module
Function RuffIssue.message is not accessible from the ruff module
noqaRow() 🔗
Return Type
Integer !
Example
Function RuffIssue.noqaRow is not accessible from the ruff module
Function RuffIssue.noqaRow is not accessible from the ruff module
Function RuffIssue.noqaRow is not accessible from the ruff module
Function RuffIssue.noqaRow is not accessible from the ruff module
url() 🔗
Return Type
String !
Example
Function RuffIssue.url is not accessible from the ruff module
Function RuffIssue.url is not accessible from the ruff module
Function RuffIssue.url is not accessible from the ruff module
Function RuffIssue.url is not accessible from the ruff module
isError() 🔗
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 module
Function RuffIssue.isError is not accessible from the ruff module
Function RuffIssue.isError is not accessible from the ruff module
Function RuffIssue.isError is not accessible from the ruff module
filename() 🔗
Return Type
String !
Example
Function RuffIssue.filename is not accessible from the ruff module
Function RuffIssue.filename is not accessible from the ruff module
Function RuffIssue.filename is not accessible from the ruff module
Function RuffIssue.filename is not accessible from the ruff module
summary() 🔗
Return Type
String !
Example
Function RuffIssue.summary is not accessible from the ruff module
Function RuffIssue.summary is not accessible from the ruff module
Function RuffIssue.summary is not accessible from the ruff module
Function RuffIssue.summary is not accessible from the ruff module
Location 🔗
column() 🔗
Return Type
Integer !
Example
Function RuffLocation.column is not accessible from the ruff module
Function RuffLocation.column is not accessible from the ruff module
Function RuffLocation.column is not accessible from the ruff module
Function RuffLocation.column is not accessible from the ruff module
row() 🔗
Return Type
Integer !
Example
Function RuffLocation.row is not accessible from the ruff module
Function RuffLocation.row is not accessible from the ruff module
Function RuffLocation.row is not accessible from the ruff module
Function RuffLocation.row is not accessible from the ruff module
Fix 🔗
applicability() 🔗
Return Type
String !
Example
Function RuffFix.applicability is not accessible from the ruff module
Function RuffFix.applicability is not accessible from the ruff module
Function RuffFix.applicability is not accessible from the ruff module
Function RuffFix.applicability is not accessible from the ruff module
edits() 🔗
Return Type
[Edit ! ] !
Example
Function RuffFix.edits is not accessible from the ruff module
Function RuffFix.edits is not accessible from the ruff module
Function RuffFix.edits is not accessible from the ruff module
Function RuffFix.edits is not accessible from the ruff module
message() 🔗
Return Type
String !
Example
Function RuffFix.message is not accessible from the ruff module
Function RuffFix.message is not accessible from the ruff module
Function RuffFix.message is not accessible from the ruff module
Function RuffFix.message is not accessible from the ruff module
Edit 🔗
content() 🔗
Return Type
String !
Example
Function RuffEdit.content is not accessible from the ruff module
Function RuffEdit.content is not accessible from the ruff module
Function RuffEdit.content is not accessible from the ruff module
Function RuffEdit.content is not accessible from the ruff module
endLocation() 🔗
Return Type
Location !
Example
Function RuffEdit.endLocation is not accessible from the ruff module
Function RuffEdit.endLocation is not accessible from the ruff module
Function RuffEdit.endLocation is not accessible from the ruff module
Function RuffEdit.endLocation is not accessible from the ruff module
location() 🔗
Return Type
Location !
Example
Function RuffEdit.location is not accessible from the ruff module
Function RuffEdit.location is not accessible from the ruff module
Function RuffEdit.location is not accessible from the ruff module
Function RuffEdit.location is not accessible from the ruff module