<commit_before>#!/bin/bash

ROOT=$(dirname $0)/..

is_our_module () {
  local path=`basename "${1}"`
  local not_ours=( "apache" "firewall" "postgresql" "puppetlabs-stdlib" )
  local mod

  for mod in "${not_ours[@]}"
  do
    [[ "${mod}" == "${path}" ]] && return 1
  done

  return 0
}

code=0

for mod in ${ROOT}/puppet/modules/*
do
  if is_our_module "${mod}"
  then
    puppet-lint --log-format "%{fullpath}:%{linenumber} %{KIND} %{message}" --no-documentation-check --no-80chars-check --fail-on-warnings "${mod}"

    ret=$?
    [[ "${code}" != "1" ]] && code="${ret}"
  fi
done

exit "${code}"<commit_msg>Remove class_inherits_from_params_class check (since we're using Puppet 2.7)<commit_after>#!/bin/bash

ROOT=$(dirname $0)/..

is_our_module () {
  local path=`basename "${1}"`
  local not_ours=( "apache" "firewall" "postgresql" "puppetlabs-stdlib" )
  local mod

  for mod in "${not_ours[@]}"
  do
    [[ "${mod}" == "${path}" ]] && return 1
  done

  return 0
}

code=0

for mod in ${ROOT}/puppet/modules/*
do
  if is_our_module "${mod}"
  then
    puppet-lint --log-format "%{fullpath}:%{linenumber} %{KIND} %{message}" \
      --no-documentation-check \
      --no-80chars-check \
      --no-class_inherits_from_params_class-check \
      --fail-on-warnings \
      "${mod}"

    ret=$?
    [[ "${code}" != "1" ]] && code="${ret}"
  fi
done

exit "${code}"
{'fraction_non_alphanumeric': 0.21808898614150254, 'fraction_numerical': 0.01312910284463895, 'mean_word_length': 3.260869565217391, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1138605', 'n_tokens_mistral': 548, 'n_tokens_neox': 521, 'n_words': 115}