swiftcheck

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 10 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 Swift check registrations.

Types

type BuildCheck

type BuildCheck struct{}

BuildCheck runs swift build to verify the project compiles.

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)

Run executes swift build to check compilation.

type CoverageCheck

type CoverageCheck struct {
	Threshold float64
}

CoverageCheck verifies test coverage meets the 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)

Run checks test coverage using swift test with coverage enabled.

type DepsCheck

type DepsCheck struct{}

DepsCheck checks for dependency issues in Package.resolved.

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)

Run checks Package.resolved for outdated or potentially vulnerable dependencies.

type FormatCheck

type FormatCheck struct {
	Config *config.SwiftLanguageConfig
}

FormatCheck verifies Swift code is 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)

Run checks if code is properly formatted using swift-format or swiftformat.

type LintCheck

type LintCheck struct {
	Config *config.SwiftLanguageConfig
}

LintCheck runs SwiftLint to check for common mistakes and style issues.

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)

Run executes swiftlint.

type ProjectCheck

type ProjectCheck struct{}

ProjectCheck verifies that a Swift project exists (Package.swift).

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)

Run checks for Package.swift and extracts project information.

type TestsCheck

type TestsCheck struct{}

TestsCheck runs swift test to verify tests pass.

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)

Run executes swift test.

Jump to

Keyboard shortcuts

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