Sha256: 38b574d36f28a1830dfbb11906bfc9aa407e3b1f3ba03c2d47da1e5342467482
Contents?: true
Size: 496 Bytes
Versions: 11
Compression:
Stored size: 496 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit subject length is short and concise. class CommitSubjectLength < Abstract def valid? = commit.subject.sub(/(fixup!|squash!)\s{1}/, "").size <= maximum def issue return {} if valid? {hint: "Use #{maximum} characters or less."} end private def maximum = configuration.commits_subject_length_maximum end end end end
Version data entries
11 entries across 11 versions & 1 rubygems