final tt updates
[emacs-init.git] / elpa / flycheck-kotlin-20170122.1137 / flycheck-kotlin.el
1 ;;; flycheck-kotlin.el --- Support kotlin in flycheck
2
3 ;; Copyright (C) 2017 Elric Milon <whirm@__REMOVETHIS__gmx.com>
4 ;;
5 ;; Author: Elric Milon <whirm_REMOVETHIS__@gmx.com>
6 ;; Created: 20 January 2017
7 ;; Version: 0.1
8 ;; Package-Version: 20170122.1137
9 ;; Package-Requires: ((flycheck "0.18"))
10
11 ;;; Commentary:
12
13 ;; This package adds support for kotlin to flycheck. To use it, add
14 ;; to your init.el:
15
16 ;; (require 'flycheck-kotlin)
17 ;; (add-hook 'kotlin-mode-hook 'flycheck-mode)
18
19 ;;; License:
20
21 ;; This file is not part of GNU Emacs.
22 ;; However, it is distributed under the same license.
23
24 ;; GNU Emacs is free software; you can redistribute it and/or modify
25 ;; it under the terms of the GNU General Public License as published by
26 ;; the Free Software Foundation; either version 3, or (at your option)
27 ;; any later version.
28
29 ;; GNU Emacs is distributed in the hope that it will be useful,
30 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
31 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
32 ;; GNU General Public License for more details.
33
34 ;; You should have received a copy of the GNU General Public License
35 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
36 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
37 ;; Boston, MA 02110-1301, USA.
38
39 ;;; Code:
40 (require 'flycheck)
41
42 (flycheck-define-checker kotlin-ktlint
43   "A Kotlin syntax and style checker using the ktlint utility.
44 See URL `https://github.com/shyiko/ktlint'."
45   :command ("ktlint" source-inplace)
46   :error-patterns
47   ((error line-start (file-name) ":" line ":" column ": " (message) line-end))
48   :modes kotlin-mode)
49
50
51 ;;;###autoload
52 (defun flycheck-kotlin-setup ()
53   "Setup Flycheck for Kotlin."
54   (add-to-list 'flycheck-checkers 'kotlin-ktlint))
55
56 (provide 'flycheck-kotlin)
57 ;;; flycheck-kotlin.el ends here