Crate git_checks

source ·
Expand description

Git checks

There are many things in git repositories which can be checked mechanically such as whitespace errors, submodule availability, eligibility for a branch, and more. This crate provides traits for these checks and a set of common checks which operate with minimal file inspection.

Modules

Basic Checks
Module for importing all types and traits for implementing checks.

Structs

Git context for use in checks.
The results of a check.
Representation of a commit with information useful for commit checks.
Information about a file that changed in a commit.
The Error type.
Configuration for checks to run against a repository.
Representation of a topic with information useful for commit checks.

Enums

States attributes may be in.
The kind of an error.
A representation of filenames as given by Git.
The severity of a message.
Ways a file can be changed in a commit.

Traits

Interface for checks which runs once for the entire branch.
Interface for checks which run for each commit.
A trait for representing the content of a diff.
Interface for checks which check the content of files.
Additional methods for Result, for easy interaction with this crate.
Interface for checks which runs once for the entire branch, but with access to the content.

Type Definitions

Convenient wrapper around std::Result.