Sha256: b775b776d36ddd296ad77c0d32983a2685f43ba54493f6f78de51f8ab6ec04f3
Contents?: true
Size: 568 Bytes
Versions: 26
Compression:
Stored size: 568 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? raw = commit.raw subject, body = raw.split "\n", 2 return true if !String(subject).empty? && String(body).strip.empty? raw.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
26 entries across 26 versions & 1 rubygems