Class: Repokeeper::Analyzers::MergeCommits

Inherits:
Analyzer
  • Object
show all
Includes:
CommitsAnalyzer
Defined in:
lib/repokeeper/analyzers/commits/merge_commits.rb

Overview

Analyzes merge commits commits level analyzer

Instance Method Summary collapse

Methods included from CommitsAnalyzer

included

Methods inherited from Analyzer

all, #enabled?, inherited, #initialize, #name

Constructor Details

This class inherits a constructor from Repokeeper::Analyzers::Analyzer

Instance Method Details

#process_commit(commit) ⇒ Object



7
8
9
# File 'lib/repokeeper/analyzers/commits/merge_commits.rb', line 7

def process_commit(commit)
  create_offense(commit, 'merge commit') if commit.parents.count > 1
end