[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/flymake-kondor 29f80de 01/19: v0.0.1
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/flymake-kondor 29f80de 01/19: v0.0.1 |
Date: |
Fri, 8 Oct 2021 08:58:03 -0400 (EDT) |
branch: elpa/flymake-kondor
commit 29f80dee6bae7bb94f8223bb51bfc9165107893a
Author: admin@turbocafe.in.eu.org <admin@turbocafe.in.eu.org>
Commit: admin@turbocafe.in.eu.org <admin@turbocafe.in.eu.org>
v0.0.1
---
README.org | 25 +++++++++++++++++++++
flymake-kondor.el | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 92 insertions(+)
diff --git a/README.org b/README.org
new file mode 100644
index 0000000..d79ca2d
--- /dev/null
+++ b/README.org
@@ -0,0 +1,25 @@
+# -*- mode:org; ispell-dictionary:"en_GB" -*-
+#+TITLE: flymake backend clj-kondo
+#+AUTHOR: https://turbocafe.keybase.pub
+
+this package integrates clj-kondo a clojure linter into emacs'
+flymake; get clj-kondo following
[[https://github.com/borkdude/clj-kondo/blob/master/doc/install.md][installation
instructions]];
+
+this package isn't on melpa, so emacs has to load it from where i
+store flymake-kondor.el, i do it with use-package, like below
+
+#+BEGIN_SRC emasc-lisp
+(use-package flymake-kondor
+ :ensure flymake-quickdef
+ :after flymake
+ :load-path "~/.emacs.d/site-lisp/flymake-kondor"
+ :init
+ (add-hook 'clojure-mode-hook #'flymake-kondor-setup)
+ :config
+ (define-key flymake-mode-map (kbd "<f8>") 'flymake-goto-next-error)
+ (define-key flymake-mode-map (kbd "<f7>") 'flymake-goto-prev-error))
+#+END_SRC
+
+when in clojure-mode flymake-mode is activated and you can navigate to
+prev/next error in buffer; there's
[[https://github.com/borkdude/flycheck-clj-kondo][sister project]] that
integrates
+clj-kondo into flycheck if you use that one
diff --git a/flymake-kondor.el b/flymake-kondor.el
new file mode 100644
index 0000000..ffe6934
--- /dev/null
+++ b/flymake-kondor.el
@@ -0,0 +1,67 @@
+;;; flymake-kondor.el --- emacs linter with clj-kondo -*- lexical-binding: t;
-*-
+
+;; Copyright (C) 2019 https://turbocafe.keybase.pub
+;;
+;; Author: https://turbocafe.keybase.pub
+;; Created: 3 November 2019
+;; Version: 0.0.1
+;; Package-Requires: ((flymake-quickdef "0.1.1"))
+
+;;; Commentary:
+
+;; This package adds Clojure syntax checker clj-kondo.
+;; Make sure clj-kondo binary is on your path.
+;; Installation instructions
https://github.com/borkdude/clj-kondo/blob/master/doc/install.md
+
+;;; License:
+
+;; This file is not part of GNU Emacs.
+;; However, it is distributed under the same license.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'flymake-quickdef)
+
+(flymake-quickdef-backend flymake-kondor-backend
+ :pre-let ((kondor-exec (executable-find "clj-kondo")))
+ :pre-check (unless kondor-exec (error "Not found clj-kondo on PATH"))
+ :write-type 'pipe
+ :proc-form (list kondor-exec "--lint" "-")
+ :search-regexp "^.+:\\([[:digit:]]+\\):\\([[:digit:]]+\\):
\\([[:alpha:]]+\\): \\(.+\\)$"
+ :prep-diagnostic
+ (let* ((lnum (string-to-number (match-string 1)))
+ (lcol (string-to-number (match-string 2)))
+ (severity (match-string 3))
+ (msg (match-string 4))
+ (pos (flymake-diag-region fmqd-source lnum lcol))
+ (beg (car pos))
+ (end (cdr pos))
+ (type (cond
+ ((string= severity "error") :error)
+ ((string= severity "warning") :warning)
+ ((string= severity "info") :note)
+ (t :note))))
+ (list fmqd-source beg end type msg)))
+;;;###autoload
+(defun flymake-kondor-setup ()
+ (flymake-mode t)
+ (add-hook 'flymake-diagnostic-functions 'flymake-kondor-backend nil t))
+
+(provide 'flymake-kondor)
+
+;;; flymake-kondor.el ends here
- [nongnu] branch elpa/flymake-kondor created (now 0058ef5), ELPA Syncer, 2021/10/08
- [nongnu] elpa/flymake-kondor 29f80de 01/19: v0.0.1,
ELPA Syncer <=
- [nongnu] elpa/flymake-kondor 19292a8 02/19: package-linted source, ELPA Syncer, 2021/10/08
- [nongnu] elpa/flymake-kondor 5e447cc 03/19: checkdock source, ELPA Syncer, 2021/10/08
- [nongnu] elpa/flymake-kondor 0de12e7 04/19: melpa and github instructions, ELPA Syncer, 2021/10/08
- [nongnu] elpa/flymake-kondor dc50d6a 07/19: melpa package test and build, ELPA Syncer, 2021/10/08
- [nongnu] elpa/flymake-kondor 7cc3adf 15/19: Remove flymake-quickdef dependency, ELPA Syncer, 2021/10/08
- [nongnu] elpa/flymake-kondor 72052b5 14/19: increment version, ELPA Syncer, 2021/10/08
- [nongnu] elpa/flymake-kondor e885669 08/19: package-lint fixes, ELPA Syncer, 2021/10/08
- [nongnu] elpa/flymake-kondor c17c1c6 18/19: Remove reference to flymake-quickdef, ELPA Syncer, 2021/10/08
- [nongnu] elpa/flymake-kondor 2af1876 05/19: readme, ELPA Syncer, 2021/10/08
- [nongnu] elpa/flymake-kondor 8353e0a 06/19: title, ELPA Syncer, 2021/10/08