Dagger
Search

ruff

Ruff is an extremely fast Python linter and code formatter written in Rust.
This module provides functions to run lint checks and formatting validations.

Installation

dagger install github.com/softwaredevelop/daggerverse/ruff@f9a9366ca0e07c172ce325edbcb911e3f922922b

Entrypoint

Return Type
Ruff !
Arguments
NameTypeDefault ValueDescription
imageString -Custom image reference in "repository:tag" format to use as a base container.
Example
dagger -m github.com/softwaredevelop/daggerverse/ruff@f9a9366ca0e07c172ce325edbcb911e3f922922b 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 provides functions for running the Ruff linter and formatter.

check() 🔗

Check runs ruff check on the target directory. It supports standalone checks or using a custom ruff.toml / pyproject.toml configuration.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-

Source directory containing Python files or Jupyter notebooks.

configFile -

Optional configuration file (ruff.toml or pyproject.toml).

Example
dagger -m github.com/softwaredevelop/daggerverse/ruff@f9a9366ca0e07c172ce325edbcb911e3f922922b call \
 check --source DIR_PATH
func (m *MyModule) Example(source *dagger.Directory) *dagger.Container  {
	return dag.
			Ruff().
			Check(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
	return (
		dag.ruff()
		.check(source)
	)
@func()
example(source: Directory): Container {
	return dag
		.ruff()
		.check(source)
}

checkWithConfig() 🔗

CheckWithConfig runs ruff check with a configuration file. Maintained for explicit backwards compatibility.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-

Source directory containing Python files or Jupyter notebooks.

fileFile !-

Configuration file for ruff.

Example
dagger -m github.com/softwaredevelop/daggerverse/ruff@f9a9366ca0e07c172ce325edbcb911e3f922922b call \
 check-with-config --source DIR_PATH --file file:path
func (m *MyModule) Example(source *dagger.Directory, file *dagger.File) *dagger.Container  {
	return dag.
			Ruff().
			Checkwithconfig(source, file)
}
@function
def example(source: dagger.Directory, file: dagger.File) -> dagger.Container:
	return (
		dag.ruff()
		.checkwithconfig(source, file)
	)
@func()
example(source: Directory, file: File): Container {
	return dag
		.ruff()
		.checkWithConfig(source, file)
}

formatCheck() 🔗

FormatCheck runs ruff format –check to verify code formatting without modifying files.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-

Source directory containing Python files or Jupyter notebooks.

configFile -

Optional configuration file (ruff.toml or pyproject.toml).

Example
dagger -m github.com/softwaredevelop/daggerverse/ruff@f9a9366ca0e07c172ce325edbcb911e3f922922b call \
 format-check --source DIR_PATH
func (m *MyModule) Example(source *dagger.Directory) *dagger.Container  {
	return dag.
			Ruff().
			Formatcheck(source)
}
@function
def example(source: dagger.Directory) -> dagger.Container:
	return (
		dag.ruff()
		.formatcheck(source)
	)
@func()
example(source: Directory): Container {
	return dag
		.ruff()
		.formatCheck(source)
}