Class: Git::Lint::Analyzer
- Inherits:
-
Object
- Object
- Git::Lint::Analyzer
- Defined in:
- lib/git/lint/analyzer.rb
Overview
Runs all analyzers.
Constant Summary collapse
- ANALYZERS =
rubocop:todo Metrics/CollectionLiteralLength
[ Analyzers::CommitAuthorCapitalization, Analyzers::CommitAuthorEmail, Analyzers::CommitAuthorName, Analyzers::CommitBodyBullet, Analyzers::CommitBodyBulletCapitalization, Analyzers::CommitBodyBulletDelimiter, Analyzers::CommitBodyLeadingLine, Analyzers::CommitBodyLineLength, Analyzers::CommitBodyParagraphCapitalization, Analyzers::CommitBodyPhrase, Analyzers::CommitBodyPresence, Analyzers::CommitBodySingleBullet, Analyzers::CommitBodyTrackerShorthand, Analyzers::CommitSignature, Analyzers::CommitSubjectLength, Analyzers::CommitSubjectPrefix, Analyzers::CommitSubjectSuffix, Analyzers::CommitTrailerCollaboratorCapitalization, Analyzers::CommitTrailerCollaboratorEmail, Analyzers::CommitTrailerCollaboratorKey, Analyzers::CommitTrailerCollaboratorName, Analyzers::CommitTrailerDuplicate, Analyzers::CommitTrailerFormatKey, Analyzers::CommitTrailerFormatValue, Analyzers::CommitTrailerIssueKey, Analyzers::CommitTrailerIssueValue, Analyzers::CommitTrailerSignerCapitalization, Analyzers::CommitTrailerSignerEmail, Analyzers::CommitTrailerSignerKey, Analyzers::CommitTrailerSignerName, Analyzers::CommitTrailerTrackerKey, Analyzers::CommitTrailerTrackerValue ].freeze
Instance Method Summary collapse
-
#call(commits: Commits::Loader.new.call) ⇒ Object
rubocop:enable Metrics/ParameterLists.
-
#initialize(analyzers: ANALYZERS, collector: Collector.new, reporter: Reporters::Branch) ⇒ Analyzer
constructor
rubocop:disable Metrics/ParameterLists.
Constructor Details
#initialize(analyzers: ANALYZERS, collector: Collector.new, reporter: Reporters::Branch) ⇒ Analyzer
rubocop:disable Metrics/ParameterLists
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/git/lint/analyzer.rb', line 47 def initialize( analyzers: ANALYZERS, collector: Collector.new, reporter: Reporters::Branch, ** ) super(**) @analyzers = analyzers @collector = collector @reporter = reporter end |
Instance Method Details
#call(commits: Commits::Loader.new.call) ⇒ Object
rubocop:enable Metrics/ParameterLists
60 61 62 63 64 |
# File 'lib/git/lint/analyzer.rb', line 60 def call commits: Commits::Loader.new.call process commits a_reporter = reporter.new(collector:) block_given? ? yield(collector, a_reporter) : [collector, a_reporter] end |