Sha256: 3e3d26da3ca0ea94712731a73aa7755699fec35135ac168024e9f5c64fe8c2b3
Contents?: true
Size: 584 Bytes
Versions: 16
Compression:
Stored size: 584 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes leading line between commit subject and start of body. class CommitBodyLeadingLine < Abstract 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
16 entries across 16 versions & 1 rubygems