<commit_before><?php
// Copyright 2004-present Facebook.  All rights reserved.

class FacebookFbcodeLintEngine extends ArcanistLintEngine {

  public function buildLinters() {
    $linters = array();
    $paths = $this->getPaths();

    // Remove all deleted files, which are not checked by the
    // following linters.
    foreach ($paths as $key => $path) {
      if (!Filesystem::pathExists($this->getFilePathOnDisk($path))) {
        unset($paths[$key]);
      }
    }

    $generated_linter = new ArcanistGeneratedLinter();
    $linters[] = $generated_linter;

    $nolint_linter = new ArcanistNoLintLinter();
    $linters[] = $nolint_linter;

    $text_linter = new ArcanistTextLinter();
    $text_linter->setCustomSeverityMap(array(
      ArcanistTextLinter::LINT_LINE_WRAP
        => ArcanistLintSeverity::SEVERITY_ADVICE,
    ));
    $linters[] = $text_linter;

    $java_text_linter = new ArcanistTextLinter();
    $java_text_linter->setMaxLineLength(100);
    $java_text_linter->setCustomSeverityMap(array(
      ArcanistTextLinter::LINT_LINE_WRAP
        => ArcanistLintSeverity::SEVERITY_ADVICE,
    ));
    $linters[] = $java_text_linter;

    $python_linter = new ArcanistPEP8Linter();
    $linters[] = $python_linter;

   // Currently we can't run cpplint in commit hook mode, because it
    // depends on having access to the working directory.
    if (!$this->getCommitHookMode()) {
      $cpp_linters = array();
      $google_linter = new ArcanistCpplintLinter();
      $google_linter->setConfig(array(
        'lint.cpplint.prefix' => '',
        'lint.cpplint.bin' => 'cpplint',
      ));
      $cpp_linters[] = $linters[] = $google_linter;
      $cpp_linters[] = $linters[] = new FbcodeCppLinter();<commit_msg>Removed code which prevents `arc lint` from working properly.<commit_after><?php
// Copyright 2004-present Facebook.  All rights reserved.

class FacebookFbcodeLintEngine extends ArcanistLintEngine {

  public function buildLinters() {
    $linters = array();
    $paths = $this->getPaths();

    // Remove all deleted files, which are not checked by the
    // following linters.
    foreach ($paths as $key => $path) {
      if (!Filesystem::pathExists($this->getFilePathOnDisk($path))) {
        unset($paths[$key]);
      }
    }

    $generated_linter = new ArcanistGeneratedLinter();
    $linters[] = $generated_linter;

    $nolint_linter = new ArcanistNoLintLinter();
    $linters[] = $nolint_linter;

    $text_linter = new ArcanistTextLinter();
    $text_linter->setCustomSeverityMap(array(
      ArcanistTextLinter::LINT_LINE_WRAP
        => ArcanistLintSeverity::SEVERITY_ADVICE,
    ));
    $linters[] = $text_linter;

    $java_text_linter = new ArcanistTextLinter();
    $java_text_linter->setMaxLineLength(100);
    $java_text_linter->setCustomSeverityMap(array(
      ArcanistTextLinter::LINT_LINE_WRAP
        => ArcanistLintSeverity::SEVERITY_ADVICE,
    ));
    $linters[] = $java_text_linter;

    $python_linter = new ArcanistPEP8Linter();
    $linters[] = $python_linter;

   // Currently we can't run cpplint in commit hook mode, because it
    // depends on having access to the working directory.
    if (!$this->getCommitHookMode()) {
      $cpp_linters = array();
      $google_linter = new ArcanistCpplintLinter();
      $cpp_linters[] = $linters[] = $google_linter;
      $cpp_linters[] = $linters[] = new FbcodeCppLinter();
{'fraction_non_alphanumeric': 0.12784174785946265, 'fraction_numerical': 0.0047239444936522, 'mean_word_length': 3.673103448275862, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5537898', 'n_tokens_mistral': 1159, 'n_tokens_neox': 1133, 'n_words': 217}