<commit_before>module Homebrew
  module Diagnostic
    class Checks
      def development_tools_checks
        %w[
          check_for_unsupported_macos
          check_for_prerelease_xcode
          check_for_bad_install_name_tool
          check_for_installed_developer_tools
          check_xcode_license_approved
          check_for_osx_gcc_installer
          check_xcode_8_without_clt_on_el_capitan
        ]
      end

      def fatal_development_tools_checks
        if MacOS.prerelease?
          %w[
            check_xcode_up_to_date
            check_clt_up_to_date
          ]
        else
          %w[
          ]
        end
      end

      def check_for_unsupported_macos
        return if ARGV.homebrew_developer?

        who = "We"
        if OS::Mac.prerelease?
          what = "pre-release version"
        elsif OS::Mac.outdated_release?
          who << " (and Apple)"
          what = "old version"
        else
          return
        end

        <<-EOS.undent
          You are using macOS #{MacOS.version}.
          #{who} do not provide support for this #{what}.
          You may encounter build failures or other breakages.
          Please create pull-requests instead of filing issues.
        EOS<commit_msg>diagnostic: make using outdated dev tools fatal<commit_after>module Homebrew
  module Diagnostic
    class Checks
      def development_tools_checks
        %w[
          check_for_unsupported_macos
          check_for_prerelease_xcode
          check_for_bad_install_name_tool
          check_for_installed_developer_tools
          check_xcode_license_approved
          check_for_osx_gcc_installer
          check_xcode_8_without_clt_on_el_capitan
        ]
      end

      def fatal_development_tools_checks
        if ENV["TRAVIS"] || ARGV.homebrew_developer?
          %w[
          ]
        else
          %w[
            check_xcode_up_to_date
            check_clt_up_to_date
          ]
        end
      end

      def check_for_unsupported_macos
        return if ARGV.homebrew_developer?

        who = "We"
        if OS::Mac.prerelease?
          what = "pre-release version"
        elsif OS::Mac.outdated_release?
          who << " (and Apple)"
          what = "old version"
        else
          return
        end

        <<-EOS.undent
          You are using macOS #{MacOS.version}.
          #{who} do not provide support for this #{what}.
          You may encounter build failures or other breakages.
          Please create pull-requests instead of filing issues.
        EOS
{'fraction_non_alphanumeric': 0.04898119122257053, 'fraction_numerical': 0.0007836990595611285, 'mean_word_length': 1.7540453074433657, 'pattern_counts': {'":': 0, '<': 11, '<?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': '3860172', 'n_tokens_mistral': 755, 'n_tokens_neox': 720, 'n_words': 168}