<commit_before># encoding: utf-8
module RailsBestPractices
  module Core
    # A Check class that takes charge of checking the sexp.
    class Check

      ALL_FILES = /.*/
      CONTROLLER_FILES = /controllers\/.*\.rb$/
      MIGRATION_FILES = /db\/migrate\/.*\.rb$/
      MODEL_FILES = /models\/.*\.rb$/
      MAILER_FILES = /models\/.*mailer\.rb$|mailers\/.*mailer\.rb/
      VIEW_FILES = /views\/.*\.(erb|haml)$/
      PARTIAL_VIEW_FILES = /views\/.*\/_.*\.(erb|haml)$/
      ROUTE_FILES = /config\/routes.*\.rb/
      SCHEMA_FILE = /db\/schema\.rb/
      HELPER_FILES = /helpers\/.*\.rb$/
      DEPLOY_FILES = /config\/deploy.*\.rb/

      def initialize(options={})
        options.each do |key, value|
          instance_variable_set("@#{key}", value)
        end
      end

      # interesting nodes that the check will parse.
      def interesting_nodes<commit_msg>support cells<commit_after># encoding: utf-8
module RailsBestPractices
  module Core
    # A Check class that takes charge of checking the sexp.
    class Check
      ALL_FILES = /.*/
      CONTROLLER_FILES = /(controllers|cells)\/.*\.rb$/
      MIGRATION_FILES = /db\/migrate\/.*\.rb$/
      MODEL_FILES = /models\/.*\.rb$/
      MAILER_FILES = /models\/.*mailer\.rb$|mailers\/.*mailer\.rb/
      VIEW_FILES = /(views|cells)\/.*\.(erb|haml)$/
      PARTIAL_VIEW_FILES = /(views|cells)\/.*\/_.*\.(erb|haml)$/
      ROUTE_FILES = /config\/routes.*\.rb/
      SCHEMA_FILE = /db\/schema\.rb/
      HELPER_FILES = /helpers\/.*\.rb$/
      DEPLOY_FILES = /config\/deploy.*\.rb/

      def initialize(options={})
        options.each do |key, value|
          instance_variable_set("@#{key}", value)
        end
      end

      # interesting nodes that the check will parse.
      def interesting_nodes
{'fraction_non_alphanumeric': 0.17108977978543197, 'fraction_numerical': 0.001129305477131564, 'mean_word_length': 2.0817391304347828, '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': '4137411', 'n_tokens_mistral': 664, 'n_tokens_neox': 601, 'n_words': 118}