<commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import os

GYP_FILE = "trace_viewer.gyp"
FILE_GROUPS = ["tracing_html_files",
    "tracing_css_files",
    "tracing_js_files",
    "tracing_img_files"]

def GypCheck():
  f = open(GYP_FILE, 'r')
  gyp = f.read()
  f.close()

  data = eval(gyp)
  gyp_files = []
  for group in FILE_GROUPS:
    gyp_files.extend(map(os.path.normpath, data["variables"][group]))

  known_files = []
  def handle(dirpath, dirnames, filenames):
    for name in filenames:
      if not name.endswith(("_test.js", "_test_data.js", "tests.html")):
        known_files.append(os.path.normpath(os.path.join(dirpath, name)))
    if '.svn' in dirnames:
      dirnames.remove('.svn')<commit_msg>Ignore dotfiles in check_gyp.py<commit_after># Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import os

GYP_FILE = "trace_viewer.gyp"
FILE_GROUPS = ["tracing_html_files",
    "tracing_css_files",
    "tracing_js_files",
    "tracing_img_files"]

def GypCheck():
  f = open(GYP_FILE, 'r')
  gyp = f.read()
  f.close()

  data = eval(gyp)
  gyp_files = []
  for group in FILE_GROUPS:
    gyp_files.extend(map(os.path.normpath, data["variables"][group]))

  known_files = []
  def handle(dirpath, dirnames, filenames):
    for name in filenames:
      if not (name.endswith(("_test.js", "_test_data.js", "tests.html")) or
         name.startswith(("."))):
        known_files.append(os.path.normpath(os.path.join(dirpath, name)))
    if '.svn' in dirnames:
      dirnames.remove('.svn')
{'fraction_non_alphanumeric': 0.1377930245854774, 'fraction_numerical': 0.004574042309891366, 'mean_word_length': 3.8076923076923075, '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': '464070', 'n_tokens_mistral': 653, 'n_tokens_neox': 640, 'n_words': 156}