Sha256: f6848bd37886ae02c801c37b509560bca6491ae51cd37fe1b3d7037c9204d49e
Contents?: true
Size: 593 Bytes
Versions: 11
Compression:
Stored size: 593 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers class CommitSubjectLength < Abstract def self.defaults { enabled: true, severity: :error, length: 72 } end def valid? commit.subject.sub(/(fixup!|squash!)\s{1}/, "").size <= length end def issue return {} if valid? {hint: "Use #{length} characters or less."} end private def length settings.fetch :length end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems