Sha256: d9a29bc308082802cb4101f585da207625e06f86016edc7a58c48c17c0ede3bf
Contents?: true
Size: 670 Bytes
Versions: 11
Compression:
Stored size: 670 Bytes
Contents
# frozen_string_literal: true module Git module Lint module Analyzers # Analyzes commit body line length to prevent unnecessary horizontal scrolling. class CommitBodyLineLength < Abstract def valid? = commit.body_lines.all? { |line| !invalid_line? line } def issue return {} if valid? { hint: "Use #{maximum} characters or less per line.", lines: affected_commit_body_lines } end protected def invalid_line?(line) = line.length > maximum private def maximum = configuration.commits_body_line_length_maximum end end end end
Version data entries
11 entries across 11 versions & 1 rubygems