 getEnabledEngines = (configFilePath) ->
   configYaml = YAML.safeLoad(FS.readFileSync(configFilePath, "utf8"))
   (engine for engine, attrs of configYaml["engines"] when attrs["enabled"] == true)
+
+getPosEnd = (posEnd, posBeg) ->
+  if posBeg == posEnd
+    return posBeg + 2
+  else
+    posEnd || 120
 
 module.exports =
   config:

        linterNameArray = linterMap['*']

        if (linterMap.hasOwnProperty(grammarName) == true)
          linterNameArray.push(linter) for linter in linterMap[grammarName]

        configurationFilePath = Helpers.findFile(fileDir, configurationFile)
        if (!configurationFilePath)

          return []

        configEnabledEngines = getEnabledEngines(configurationFilePath)
        linterEnabledEngines = (linter for linter in linterNameArray when ((linter in configEnabledEngines) == true))

        cmd = ["codeclimate analyze",
               "-f json",
               makeEngineString(linter for linter in linterEnabledEngines when linter),
               "'" + atom.project.relativize(filePath) + "'",
               "< /dev/null"].join(" ")

