<commit_before># Public: A class that contains and provides information for the puppet-lint
# checks.
#
# This class should not be used directly, but instead should be inherited.
#
# Examples
#
#   class PuppetLint::Plugin::CheckFoo < PuppetLint::CheckPlugin
#   end
class PuppetLint::CheckPlugin
  # Internal: Initialise a new PuppetLint::CheckPlugin.
  def initialize
    @problems = []
  end

  # Internal: Check the manifest for problems and filter out any problems that
  # should be ignored.
  #
  # Returns an Array of problem Hashes.
  def run
    check

    @problems.each do |problem|
      if PuppetLint::Data.ignore_overrides[problem[:check]].has_key?(problem[:line])
        problem[:kind] = :ignored
        problem[:reason] = PuppetLint::Data.ignore_overrides[problem[:check]][problem[:line]]
        next
      end
    end

    @problems
  end
<commit_msg>Allow syntax errors to be returned from check plugins<commit_after># Public: A class that contains and provides information for the puppet-lint
# checks.
#
# This class should not be used directly, but instead should be inherited.
#
# Examples
#
#   class PuppetLint::Plugin::CheckFoo < PuppetLint::CheckPlugin
#   end
class PuppetLint::CheckPlugin
  # Internal: Initialise a new PuppetLint::CheckPlugin.
  def initialize
    @problems = []
  end

  # Internal: Check the manifest for problems and filter out any problems that
  # should be ignored.
  #
  # Returns an Array of problem Hashes.
  def run
    check

    @problems.each do |problem|
      if problem[:check] != :syntax && PuppetLint::Data.ignore_overrides[problem[:check]].has_key?(problem[:line])
        problem[:kind] = :ignored
        problem[:reason] = PuppetLint::Data.ignore_overrides[problem[:check]][problem[:line]]
        next
      end
    end

    @problems
  end

{'fraction_non_alphanumeric': 0.0970231532524807, 'fraction_numerical': 0.0, 'mean_word_length': 3.665809768637532, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '642590', 'n_tokens_mistral': 568, 'n_tokens_neox': 546, 'n_words': 168}