<commit_before># frozen_string_literal: true

require "rubocops/extend/formula"

module RuboCop
  module Cop
    module FormulaAudit
      # This cop audits `uses_from_macos` dependencies in formulae
      class UsesFromMacos < FormulaCop
        # Generate with:
        # brew ruby -e 'puts Formula.select {|f| f.keg_only_reason&.provided_by_macos? }.map(&:name).sort.join("\n")'
        # Not done at runtime as its too slow and RuboCop doesn't have access.
        PROVIDED_BY_MACOS_FORMULAE = %w[
          apr
          bc
          bison
          bzip2
          cups
          curl
          dyld-headers
          expat
          file-formula
          flex
          gcore
          gnu-getopt
          icu4c
          krb5
          libarchive
          libedit
          libffi
          libiconv
          libpcap
          libressl
          libxml2
          libxslt
          llvm
          lsof
          m4
          ncompress
          ncurses
          net-snmp
          openldap
          openlibm
          pod2man
          rpcgen
          ruby
          sqlite<commit_msg>uses_from_macos: allow ed<commit_after># frozen_string_literal: true

require "rubocops/extend/formula"

module RuboCop
  module Cop
    module FormulaAudit
      # This cop audits `uses_from_macos` dependencies in formulae
      class UsesFromMacos < FormulaCop
        # Generate with:
        # brew ruby -e 'puts Formula.select {|f| f.keg_only_reason&.provided_by_macos? }.map(&:name).sort.join("\n")'
        # Not done at runtime as its too slow and RuboCop doesn't have access.
        PROVIDED_BY_MACOS_FORMULAE = %w[
          apr
          bc
          bison
          bzip2
          cups
          curl
          dyld-headers
          ed
          expat
          file-formula
          flex
          gcore
          gnu-getopt
          icu4c
          krb5
          libarchive
          libedit
          libffi
          libiconv
          libpcap
          libressl
          libxml2
          libxslt
          llvm
          lsof
          m4
          ncompress
          ncurses
          net-snmp
          openldap
          openlibm
          pod2man
          rpcgen
          ruby
          sqlite
{'fraction_non_alphanumeric': 0.045393258426966294, 'fraction_numerical': 0.005393258426966292, 'mean_word_length': 1.2304609218436873, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5440850', 'n_tokens_mistral': 660, 'n_tokens_neox': 647, 'n_words': 162}