Git::Lint::Config - configuration for Git::Lint
use Git::Lint::Config; my $config = Git::Lint::Config->load(); my $profiles = $config->{profiles};
Git::Lint::Config defines and loads settings for Git::Lint.
Git::Lint::Config
Loads check modules and user config, then returns the Git::Lint::Config object.
Reads, parses, and returns the user config settings from git config.
git config
Configuration is done through git config files (~/.gitconfig or /repo/.git/config).
Only one profile, default, is defined internally. default contains all check modules by default.
default
The default profile can be overridden through git config files (~/.gitconfig or /repo/.git/config).
To set the default profile to only run the Whitespace commit check:
Whitespace
[lint "profiles.commit"] default = Whitespace
Or set the default profile to Whitespace and the fictional commit check, Flipdoozler:
Flipdoozler
[lint "profiles.commit"] default = Whitespace, Flipdoozler
Additional profiles can be added with a new name and list of checks to run.
[lint "profiles.commit"] default = Whitespace, Flipdoozler hardcore = Other, Module, Names
Message check profiles can also be defined.
[lint "profiles.message"] # override the default profile to only contain SummaryLength, SummaryEndingPeriod, and BlankLineAfterSummary default = SummaryLength, SummaryEndingPeriod, BlankLineAfterSummary # create a summary profile with specific modules summary = SummaryEndingPeriod, SummaryLength
An example configuration is provided in the examples directory of this project.
examples
To install Git::Lint, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Git::Lint
CPAN shell
perl -MCPAN -e shell install Git::Lint
For more information on module installation, please visit the detailed CPAN module installation guide.