Module: Commitlint

Defined in:
lib/commitlint.rb,
lib/commitlint/cli.rb,
lib/commitlint/linter.rb,
lib/commitlint/version.rb,
lib/commitlint/validator.rb

Defined Under Namespace

Classes: Cli, Error, Linter, Validator

Constant Summary collapse

VALID_TYPES =
%w[feat fix docs style refactor perf test chore revert].freeze
CONVENTIONAL_COMMIT_SCHEMA =
/(?x)
  ^(?<type>#{VALID_TYPES.join("|")})  # Type
  (\((?<scope>.*?)\))?                # Optional scope
  !?                                  # Optional exclamation mark
  :                                   # Required colon
  \s                                  # Required space
  (?<subject>.*)                      # Required subject
  (\n\n(?<body>.*))?                  # Optional body
  (\n\n(?<footer>.*))?                # Optional footer
/
VERSION =
"0.2.0"