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 =
[ Analyzers::CommitAuthorCapitalization, Analyzers::CommitAuthorEmail, Analyzers::CommitAuthorName, Analyzers::CommitBodyBulletCapitalization, Analyzers::CommitBodyBulletDelimiter, Analyzers::CommitBodyBulletOnly, Analyzers::CommitBodyLeadingLine, Analyzers::CommitBodyLineLength, Analyzers::CommitBodyParagraphCapitalization, Analyzers::CommitBodyPhrase, Analyzers::CommitBodyPresence, Analyzers::CommitBodyTrackerShorthand, Analyzers::CommitBodyWordRepeat, Analyzers::CommitSignature, Analyzers::CommitSubjectLength, Analyzers::CommitSubjectPrefix, Analyzers::CommitSubjectSuffix, Analyzers::CommitSubjectWordRepeat, Analyzers::CommitTrailerCollaboratorCapitalization, Analyzers::CommitTrailerCollaboratorEmail, Analyzers::CommitTrailerCollaboratorKey, Analyzers::CommitTrailerCollaboratorName, Analyzers::CommitTrailerDuplicate, Analyzers::CommitTrailerFormatKey, Analyzers::CommitTrailerFormatValue, Analyzers::CommitTrailerIssueKey, Analyzers::CommitTrailerIssueValue, Analyzers::CommitTrailerMilestoneKey, Analyzers::CommitTrailerMilestoneValue, Analyzers::CommitTrailerOrder, Analyzers::CommitTrailerReviewerKey, Analyzers::CommitTrailerReviewerValue, 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
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/git/lint/analyzer.rb', line 51 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
64 65 66 67 68 |
# File 'lib/git/lint/analyzer.rb', line 64 def call commits: Commits::Loader.new.call process commits a_reporter = reporter.new(collector:) block_given? ? yield(collector, a_reporter) : [collector, a_reporter] end |