Sha256: e418f78f46b783244fb79b572ef6228a2cf6ca72b96021015e26951807e2990c
Contents?: true
Size: 491 Bytes
Versions: 10
Compression:
Stored size: 491 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.commits_subject_length_maximum end end end end
Version data entries
10 entries across 10 versions & 1 rubygems