<commit_before>'use babel'

import SwaggerParser from 'swagger-parser';

function canValidate(path, text) {
  return text.length > 8 &&
    /"?swagger"?\s*:\s*"\d+\.\d+"/g.test(text);
}

function errorsToLinterMessages(err, path, editor) {
  var errObj = err.toJSON();
  if (!errObj.details) {
    return Promise.resolve([{
      type: "Error",
      text: errObj.message,
      filePath: path
    }]);
  }
  return Promise.all(errObj.details.map((detail) => {
    return new Promise((resolve) => {
      var re = new RegExp(`"?${detail.path[0]}"?:`);
      editor.scan(re, (search) => {
        console.log(re, search);<commit_msg>Removed console log statement<commit_after>'use babel'

import SwaggerParser from 'swagger-parser';

function canValidate(path, text) {
  return text.length > 8 &&
    /"?swagger"?\s*:\s*"\d+\.\d+"/g.test(text);
}

function errorsToLinterMessages(err, path, editor) {
  var errObj = err.toJSON();
  if (!errObj.details) {
    return Promise.resolve([{
      type: "Error",
      text: errObj.message,
      filePath: path
    }]);
  }
  return Promise.all(errObj.details.map((detail) => {
    return new Promise((resolve) => {
      var re = new RegExp(`"?${detail.path[0]}"?:`);
      editor.scan(re, (search) => {
{'fraction_non_alphanumeric': 0.1868484362469928, 'fraction_numerical': 0.0032076984763432237, 'mean_word_length': 3.3789473684210525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2079944', 'n_tokens_mistral': 433, 'n_tokens_neox': 434, 'n_words': 86}