pythoncheck

package
v0.6.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(cfg *config.Config) []checker.CheckRegistration

Register returns all Python check registrations.

Types

type BuildCheck

type BuildCheck struct {
	Config *config.PythonLanguageConfig
}

BuildCheck verifies that Python dependencies can be installed.

func (*BuildCheck) ID

func (c *BuildCheck) ID() string

func (*BuildCheck) Name

func (c *BuildCheck) Name() string

func (*BuildCheck) Run

func (c *BuildCheck) Run(path string) (checker.Result, error)

type ComplexFunction added in v0.1.2

type ComplexFunction struct {
	Name       string
	File       string
	Line       int
	Complexity int
	Grade      string // A, B, C, D, E, F
}

ComplexFunction holds complexity info for a single function.

type ComplexityCheck added in v0.1.2

type ComplexityCheck struct {
	Config *config.PythonLanguageConfig
}

ComplexityCheck measures cyclomatic complexity of Python functions using radon.

func (*ComplexityCheck) ID added in v0.1.2

func (c *ComplexityCheck) ID() string

func (*ComplexityCheck) Name added in v0.1.2

func (c *ComplexityCheck) Name() string

func (*ComplexityCheck) Run added in v0.1.2

func (c *ComplexityCheck) Run(path string) (checker.Result, error)

type CoverageCheck

type CoverageCheck struct {
	Config *config.PythonLanguageConfig
}

CoverageCheck verifies that test coverage meets a threshold.

func (*CoverageCheck) ID

func (c *CoverageCheck) ID() string

func (*CoverageCheck) Name

func (c *CoverageCheck) Name() string

func (*CoverageCheck) Run

func (c *CoverageCheck) Run(path string) (checker.Result, error)

func (*CoverageCheck) SetCoverageThreshold added in v0.6.4

func (c *CoverageCheck) SetCoverageThreshold(t float64)

SetCoverageThreshold overrides the coverage threshold for this check.

type DeadcodeCheck added in v0.6.4

type DeadcodeCheck struct{}

DeadcodeCheck detects unused code using vulture.

func (*DeadcodeCheck) ID added in v0.6.4

func (c *DeadcodeCheck) ID() string

func (*DeadcodeCheck) Name added in v0.6.4

func (c *DeadcodeCheck) Name() string

func (*DeadcodeCheck) Run added in v0.6.4

func (c *DeadcodeCheck) Run(path string) (checker.Result, error)

type DepsCheck

type DepsCheck struct{}

DepsCheck scans for known vulnerabilities in Python dependencies.

func (*DepsCheck) ID

func (c *DepsCheck) ID() string

func (*DepsCheck) Name

func (c *DepsCheck) Name() string

func (*DepsCheck) Run

func (c *DepsCheck) Run(path string) (checker.Result, error)

type DepsFreshnessCheck added in v0.6.4

type DepsFreshnessCheck struct{}

DepsFreshnessCheck detects outdated Python dependencies.

func (*DepsFreshnessCheck) ID added in v0.6.4

func (c *DepsFreshnessCheck) ID() string

func (*DepsFreshnessCheck) Name added in v0.6.4

func (c *DepsFreshnessCheck) Name() string

func (*DepsFreshnessCheck) Run added in v0.6.4

func (c *DepsFreshnessCheck) Run(path string) (checker.Result, error)

type FormatCheck

type FormatCheck struct {
	Config *config.PythonLanguageConfig
}

FormatCheck verifies that Python code is properly formatted.

func (*FormatCheck) ID

func (c *FormatCheck) ID() string

func (*FormatCheck) Name

func (c *FormatCheck) Name() string

func (*FormatCheck) Run

func (c *FormatCheck) Run(path string) (checker.Result, error)

type LintCheck

type LintCheck struct {
	Config *config.PythonLanguageConfig
}

LintCheck runs Python linting.

func (*LintCheck) ID

func (c *LintCheck) ID() string

func (*LintCheck) Name

func (c *LintCheck) Name() string

func (*LintCheck) Run

func (c *LintCheck) Run(path string) (checker.Result, error)

type LoggingCheck added in v0.1.2

type LoggingCheck struct{}

LoggingCheck verifies proper logging practices in Python code.

func (*LoggingCheck) ID added in v0.1.2

func (c *LoggingCheck) ID() string

func (*LoggingCheck) Name added in v0.1.2

func (c *LoggingCheck) Name() string

func (*LoggingCheck) Run added in v0.1.2

func (c *LoggingCheck) Run(path string) (checker.Result, error)

type ProjectCheck

type ProjectCheck struct{}

ProjectCheck verifies that a Python project configuration exists.

func (*ProjectCheck) ID

func (c *ProjectCheck) ID() string

func (*ProjectCheck) Name

func (c *ProjectCheck) Name() string

func (*ProjectCheck) Run

func (c *ProjectCheck) Run(path string) (checker.Result, error)

type TestsCheck

type TestsCheck struct {
	Config *config.PythonLanguageConfig
}

TestsCheck runs Python tests.

func (*TestsCheck) ID

func (c *TestsCheck) ID() string

func (*TestsCheck) Name

func (c *TestsCheck) Name() string

func (*TestsCheck) Run

func (c *TestsCheck) Run(path string) (checker.Result, error)

type TypeCheck

type TypeCheck struct {
	Config *config.PythonLanguageConfig
}

TypeCheck runs mypy for Python type checking.

func (*TypeCheck) ID

func (c *TypeCheck) ID() string

func (*TypeCheck) Name

func (c *TypeCheck) Name() string

func (*TypeCheck) Run

func (c *TypeCheck) Run(path string) (checker.Result, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL