(when (eval-when-compile (>= emacs-major-version 24))
  (require-package 'flycheck)
  (add-hook 'after-init-hook 'global-flycheck-mode))

;; Override default flycheck triggers
(setq flycheck-check-syntax-automatically '(save idle-change mode-enabled)
      flycheck-idle-change-delay 0.8)
(provide 'init-flycheck)

(when (eval-when-compile (>= emacs-major-version 24))
  (require-package 'flycheck)
  (add-hook 'after-init-hook 'global-flycheck-mode))

;; Override default flycheck triggers
(setq flycheck-check-syntax-automatically '(save idle-change mode-enabled)
      flycheck-idle-change-delay 0.8)


(after-load 'flycheck
  (flycheck-define-checker ruby
    "A Ruby syntax checker using the standard (MRI) Ruby interpreter.

 See URL `http://www.ruby-lang.org/'."
    :command ("ruby" "-w" "-c" source)
    :error-patterns
    ;; These patterns support output from JRuby, too, to deal with RVM or Rbenv
    ((error line-start
            "SyntaxError in " (file-name) ":" line ": " (message)
            line-end)
     (warning line-start
              (file-name) ":" line ":" (optional column ":")
              " warning: " (message) line-end)
     (error line-start (file-name) ":" line ": " (message) line-end))
    :modes (enh-ruby-mode ruby-mode))
  (add-to-list 'flycheck-checkers 'ruby t))


(provide 'init-flycheck)

Add ruby flycheck checker locally until it is restored upstream
Add ruby flycheck checker locally until it is restored upstream

ruiyang/emacs.d,jhpx/emacs.d,Jadecity/PurcellEmacs.d,zhuoyikang/emacs.d,farzadbekran/emacs.d,emuio/emacs.d,whizzzkid/emacs.d,bibaijin/emacs.d,blueabysm/emacs.d,renatoriccio/emacs.d,jkaessens/emacs.d,46do14/emacs.d,arthurl/emacs.d,jachinpy/emacs.d,purcell/emacs.d,danfengcao/emacs.d,dcorking/emacs.d,pairyo/emacs.d,fengxl/emacs.d,blueseason/emacs.d,hkcqr/emacs.d,boblannon/emacs.d,svenyurgensson/emacs.d,gsmlg/emacs.d,farzadbekran/emacs.d,kindoblue/emacs.d,benkha/emacs.d,qianwan/emacs.d,scorpionis/emacs.d,farzadbekran/emacs.d,jthetzel/emacs.d,LKI/emacs.d,shafayetkhan/emacs.d,lromang/emacs.d,caoyuanqi/emacs.d,Enzo-Liu/emacs.d,hophacker/emacs.d,farzadbekran/emacs.d,exclamaforte/emacs.d,zhaotai/.emacs.d,ernest-dzf/emacs.d,carlosliu/emacs.d,Guoozz/emacs.d,Shanicky/emacs.d,cyjia/emacs.d,sgarciac/emacs.d,mmqmzk/emacs.d,modkzs/emcs.d,atreeyang/emacs.d,lust4life/emacs.d,ruiyang/emacs.d,mpwang/emacs.d,dongdonghu/.emacs.d,krzysz00/emacs.d,farzadbekran/emacs.d,wenpincui/emacs.d,cjqw/emacs.d,qinshulei/emacs.d,lujianmei/emacs.d,baohaojun/emacs.d,Werewolflsp/emacs.d,dhanunjaya/emacs.d,roxolan/emacs.d,me020523/emacs.d,kongfy/emacs.d,jachinpy/emacs.d,braveoyster/emacs.d,Togal/emacs.d,wegatron/emacs.d,ilove0518/emacs.d,haodaivshen/emacs.d,LittleLmp/emacs.d,zenith-john/emacs.d,alant/emacs.d,DarkThrone/emacs.d