Sha256: 6abf4f2a2f95ca8ee3836237d42174f12c19888187407f4a67421650477fd158
Contents?: true
Size: 754 Bytes
Versions: 22
Compression:
Stored size: 754 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit body for correct bullet point syntax. class CommitBodyBullet < Abstract def valid? = commit.body_lines.all? { |line| !invalid_line? line } def issue return {} if valid? { hint: %(Avoid: #{filter_list.to_hint}.), lines: affected_commit_body_lines } end protected def load_filter_list = Kit::FilterList.new(settings.excludes) # :reek:FeatureEnvy def invalid_line? line return false if line.strip.empty? !line.match?(/\A(?!\s*#{Regexp.union filter_list.to_regexp}\s+).+\Z/) end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems