Sha256: c0a87b5c58b8f7a2f7041e15026ce4aee8e6cd340f27b237d6af0c9b8c3a088a
Contents?: true
Size: 468 Bytes
Versions: 22
Compression:
Stored size: 468 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 = settings.maximum end end end end
Version data entries
22 entries across 22 versions & 1 rubygems