Class: CodeownerValidator::Tasks::MissingAssignmentChecker

Inherits:
Base
  • Object
show all
Includes:
Group
Defined in:
lib/codeowner_validator/tasks/missing_assignment_checker.rb

Overview

Public: The missing assignment checker executes an evaluation on the code owners file looking for files within the repository that are not noted as been assigned by the codeowners file

Instance Method Summary collapse

Methods inherited from Base

#codeowners, #execute, #initialize

Methods included from UtilityHelper

#in_folder

Methods included from Command

#run

Methods included from Logging

#log_command, #log_error, #log_info, #log_stderr, #log_verbose, #log_warn, #logger, #program_name

Constructor Details

This class inherits a constructor from CodeownerValidator::Tasks::Base

Instance Method Details

#commentsObject

See Also:



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/codeowner_validator/tasks/missing_assignment_checker.rb', line 18

def comments
  comments = []

  codeowners.missing_assignments.each do |file|
    comments << Comment.build(
      comment: "File '#{file}' is missing from the code owners file",
      type: Comment::TYPE_ERROR
    )
  end

  comments
end

#summaryObject

See Also:



13
14
15
# File 'lib/codeowner_validator/tasks/missing_assignment_checker.rb', line 13

def summary
  'Executing Missing Assignment Checker'
end