diff --git a/oni-cmake.el b/oni-cmake.el index 7019583..869b049 100644 --- a/oni-cmake.el +++ b/oni-cmake.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 20190402232459 -;; Package-Requires: (cmake-mode oni-company oni-fci cmake-font-lock) +;; Version: 20190501161805 +;; Package-Requires: (cmake-mode oni-company oni-fci cmake-font-lock eldoc-cmake flycheck) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -27,9 +27,11 @@ ;;; Code: (require 'compile) +(require 'flycheck) (add-hook 'cmake-mode-hook 'cmake-font-lock-activate) (add-hook 'cmake-mode-hook 'company-mode) +(add-hook 'cmake-mode-hook 'eldoc-cmake-enable) (add-hook 'cmake-mode-hook 'electric-pair-local-mode) (add-hook 'cmake-mode-hook 'fci-mode) @@ -43,6 +45,14 @@ eol) 1 2 nil 1 1)) +(flycheck-define-checker cmake-cmakelint + "A CMake checker using cmakelint. + +See URL `https://github.com/richq/cmake-lint'" + :command ("cmakelint" source) + :error-patterns ((error line-start (file-name) ":" line ": " (message) line-end)) + :modes cmake-mode) + ;;;###autoload (with-eval-after-load 'grep (add-to-list 'grep-files-aliases '("cmake" . "CMakeLists.txt *.cmake")))