Sha256: eb65a4f75c12c157629ec95ba0cfd2244c940803b7462f611294e39029be44ac
Contents?: true
Size: 700 Bytes
Versions: 6
Compression:
Stored size: 700 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit bodies with only a single bullet point. class CommitBodySingleBullet < Abstract def valid? = affected_commit_body_lines.size != 1 def issue return {} if valid? { hint: "Use paragraph instead of single bullet.", lines: affected_commit_body_lines } end protected def load_filter_list Kit::FilterList.new configuration.commits_body_single_bullet_includes end def invalid_line?(line) = line.match?(/\A#{Regexp.union filter_list.to_regexp}\s+/) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems