Class: CodeownerValidator::Tasks::SyntaxChecker

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

Overview

Public: The syntax checker executes an evaluation on the code owners file looking for missing assignment within the file itself

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/syntax_checker.rb', line 18

def comments
  comments = []

  codeowners.unrecognized_assignments.each do |line|
    comments << Comment.build(
      comment: "line #{line.line_number}: Missing owner, at least one owner is required",
      type: Comment::TYPE_ERROR
    )
  end

  comments
end

#summaryObject

See Also:



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

def summary
  'Executing Valid Syntax Checker'
end