         ("WARNING" . warning)))
 
 (defun flycheck-ycmd--result-to-error (r)
-  "Convert a ycmd parse result structure into a flycheck error
-object."
+  "Convert ycmd parse result structure R into a flycheck error object."
   (ycmd--with-destructured-parse-result
    r
    (if (string-equal filepath (buffer-file-name))

;;; flycheck-ycmd -- flycheck integration for ycmd
;;; Commentary:
;;

(require 'flycheck)
(require 'ycmd)

  (flycheck-buffer))

(defun flycheck-ycmd-setup ()
  "Convenience function to setup the ycmd flycheck checker.

This adds a hook to watch for ycmd parse results, and it adds the
ycmd checker to the list of flycheck checkers."
  (add-hook 'ycmd-file-parse-result-hook 'flycheck-ycmd--cache-parse-results)
  (add-to-list 'flycheck-checkers 'ycmd))

(flycheck-define-generic-checker 'ycmd
  "A flycheck checker using parse results from ycmd."
