text: /*global CSSLint*/
  CSSLint.addFormatter({
      //format information
      id: "text",
      name: "Plain Text",
  
      /**
       * Return content to be printed before all file results.
       * @return {String} to prepend before all results
       */
      startFormat: function() {
          return "";
      },
  
      /**
       * Return content to be printed after all file results.
       * @return {String} to append after all results
       */
      endFormat: function() {
          return "";
      },
  
      /**
       * Given CSS Lint results for a file, return output for this format.
       * @param results {Object} with error and warning messages
       * @param filename {String} relative file path
       * @param options {Object} (Optional) specifies special handling of output
       * @return {String} output for results
       */
      formatResults: function(results, filename, options) {
          var messages = results.messages,
              output = "";
          options = options || {};
  
          if (messages.length === 0) {
              return options.quiet ? "" : "\n\ncsslint: No errors in " + filename + ".";
          }
  
          output = "\n\ncsslint: There are " + messages.length  +  " problems in " + filename + ".";
          var pos = filename.lastIndexOf("/"),
              shortFilename = filename;
  
          if (pos === -1){
              pos = filename.lastIndexOf("\\");       
          }
          if (pos > -1){
              shortFilename = filename.substring(pos+1);
          }
  
          CSSLint.Util.forEach(messages, function (message, i) {
              output = output + "\n\n" + shortFilename;
              if (message.rollup) {
                  output += "\n" + (i+1) + ": " + message.type;
                  output += "\n" + message.message;
              } else {
                  output += "\n" + (i+1) + ": " + message.type + " at line " + message.line + ", col " + message.col;
                  output += "\n" + message.message;
                  output += "\n" + message.evidence;
              }
          });
      
          return output;
      }
  });