<commit_before>module.exports =
  config:
    executable:
      type: 'string'
      default: 'coala-format'

  activate: ->

  provideLinter: ->
    helpers = require('atom-linter')
    path = require('path')
    # in coala the levels are: ["DEBUG", "INFO", "WARNING", "ERROR"]
    log_levels = ["Trace", "Info", "Warning", "Error"]
    provider =
      grammarScopes: ['*']
      scope: 'file'
      lintOnFly: true
      lint: (textEditor)->
        filePath = textEditor.getPath()
        parameters = []
        parameters.push('--find-config')
        parameters.push('--files=' + filePath)
        parameters.push('--settings')
        parameters.push("format_str=" +
                        "R-{line}-{severity}-{origin}:{message}")
        return helpers.exec(atom.config.get('coala-atom.executable'),
                            parameters,
                            {cwd: path.dirname(filePath)})
                      .then (result) ->
          toReturn = []
          regex = /R-(\d+)-(\d+)-(.*)/g
          while (match = regex.exec(result)) isnt null
            line = parseInt(match[1]) or 0
            col = 0
            toReturn.push({
              type: log_levels[match[2]]
              text: match[3]
              filePath
              range: [[line - 1, col - 1], [line - 1, col]]
            })<commit_msg>main: Fix config name after package name change<commit_after>module.exports =
  config:
    executable:
      type: 'string'
      default: 'coala-format'

  activate: ->

  provideLinter: ->
    helpers = require('atom-linter')
    path = require('path')
    # in coala the levels are: ["DEBUG", "INFO", "WARNING", "ERROR"]
    log_levels = ["Trace", "Info", "Warning", "Error"]
    provider =
      grammarScopes: ['*']
      scope: 'file'
      lintOnFly: true
      lint: (textEditor)->
        filePath = textEditor.getPath()
        parameters = []
        parameters.push('--find-config')
        parameters.push('--files=' + filePath)
        parameters.push('--settings')
        parameters.push("format_str=" +
                        "R-{line}-{severity}-{origin}:{message}")
        return helpers.exec(atom.config.get('coala.executable'),
                            parameters,
                            {cwd: path.dirname(filePath)})
                      .then (result) ->
          toReturn = []
          regex = /R-(\d+)-(\d+)-(.*)/g
          while (match = regex.exec(result)) isnt null
            line = parseInt(match[1]) or 0
            col = 0
            toReturn.push({
              type: log_levels[match[2]]
              text: match[3]
              filePath
              range: [[line - 1, col - 1], [line - 1, col]]
            })
{'fraction_non_alphanumeric': 0.15589213151089767, 'fraction_numerical': 0.005910602142593277, 'mean_word_length': 1.662733529990167, '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': '4774877', 'n_tokens_mistral': 809, 'n_tokens_neox': 774, 'n_words': 165}