Sha256: 636f9b42183bd14f8a255a7eef7de2528d4ad83f0754dff257a45dff7ec94aa3
Contents?: true
Size: 631 Bytes
Versions: 9
Compression:
Stored size: 631 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers class CommitBodyLeadingLine < Abstract def self.defaults { enabled: true, severity: :error } end def valid? message = commit.message subject, body = message.split "\n", 2 return true if !String(subject).empty? && String(body).strip.empty? message.match?(/\A.+(\n\n|\#).+/m) end def issue return {} if valid? {hint: "Use blank line between subject and body."} end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems