[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idris-mode c5f42964bf 02/10: [ flycheck ] patterns work, b
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idris-mode c5f42964bf 02/10: [ flycheck ] patterns work, but issue is parsing the output. |
Date: |
Wed, 18 Jan 2023 07:59:53 -0500 (EST) |
branch: elpa/idris-mode
commit c5f42964bf1fa8cbc4ad4827b1868c2ba4a39417
Author: Jan de Muijnck-Hughes <jan.deMuijnck-Hughes@glasgow.ac.uk>
Commit: Marek L <nospam.keram@gmail.com>
[ flycheck ] patterns work, but issue is parsing the output.
Flycheck expects a 'proper name'.
---
flycheck-idris.el | 3 +--
idris-test-flycheck.el | 50 +++++++++++++++++++++++++++++++++++---------------
2 files changed, 36 insertions(+), 17 deletions(-)
diff --git a/flycheck-idris.el b/flycheck-idris.el
index 1570aa1c0d..c961ac32e5 100644
--- a/flycheck-idris.el
+++ b/flycheck-idris.el
@@ -48,8 +48,7 @@
(flycheck-define-checker idris2
"An Idris2 syntax and type checker."
:command ("idris2"
- "-q"
- "--check" "--nocolor" "--warnpartial"
+ "--check" "--no-colour"
;; Compute the command-line options similarly to inferior-idris
(eval (idris-compute-flags))
source)
diff --git a/idris-test-flycheck.el b/idris-test-flycheck.el
index 5fadfcdc7e..92b2d228ea 100644
--- a/idris-test-flycheck.el
+++ b/idris-test-flycheck.el
@@ -1,4 +1,5 @@
(require 'flycheck)
+(require 'flycheck-ert)
(require 'idris-mode)
(require 'flycheck-idris)
(require 'idris-commands)
@@ -9,21 +10,40 @@
;;; Code:
-(flycheck-parse-error-with-patterns
-(concat "Warning: We are about to implicitly bind the following lowercase
names.\n"
- "You may be unintentionally shadowing the associated global
definitions:\n"
- " plus is shadowing Main.plus, Prelude.Types.plus\n"
- "\n"
- "Temp:5:3--5:4\n"
- " 1 | plus : Nat -> Nat -> Nat \n"
- " 2 | plus x y = plus x \"w\" \n"
- " 3 | \n"
- " 4 | data Foo : Nat -> Type where\n"
- " 5 | F : Foo plus \n"
- " ^ \n"
- "\n")
-(flycheck-checker-get 'idris2 'error-patterns)
-'idris2)
+(ert-deftest idris2-test-flycheck-warning ()
+ "Test parsing of warnings with flycheck."
+ (should (eql
+ (flycheck-parse-error-with-patterns
+ (concat "Warning: We are about to implicitly bind the following
lowercase names.\n"
+ "You may be unintentionally shadowing the associated
global definitions:\n"
+ " plus is shadowing Main.plus, Prelude.Types.plus\n"
+ "\n"
+ "Temp:5:3--5:4\n"
+ " 1 | plus : Nat -> Nat -> Nat \n"
+ " 2 | plus x y = plus x \"w\" \n"
+ " 3 | \n"
+ " 4 | data Foo : Nat -> Type where\n"
+ " 5 | F : Foo plus \n"
+ " ^ \n"
+ "\n\n")
+ (flycheck-checker-get 'idris2 'error-patterns) 'idris2)
+ (flycheck-error-new
+ :filename "Temp"
+ :checker 'idris2
+
+ :line 5
+ :column 3
+ :end-column 5
+ :level 'warning
+ :id nil
+ :message (concat
+ "Warning: We are about to implicitly bind the following
lowercase names.\n"
+ "You may be unintentionally shadowing the associated
global definitions:\n"
+ " plus is shadowing Main.plus, Prelude.Types.plus\n"
+ "\n"))))
+ )
+
+;;; Hand tests
(flycheck-parse-error-with-patterns
(concat "Error: While processing right hand side of plus. Ambiguous
elaboration. Possible results:\n"
- [nongnu] elpa/idris-mode updated (e39bb892f8 -> 7a7a468000), ELPA Syncer, 2023/01/18
- [nongnu] elpa/idris-mode dcf41da3e2 03/10: [ flycheck ] removed tests that did not work properly., ELPA Syncer, 2023/01/18
- [nongnu] elpa/idris-mode cab781537f 05/10: Improve flycheck error patterns for Idris(2), ELPA Syncer, 2023/01/18
- [nongnu] elpa/idris-mode 6272999465 09/10: [ flycheck ] Handle Idris2 reported "Uncought error", ELPA Syncer, 2023/01/18
- [nongnu] elpa/idris-mode 7b6e3054ba 08/10: Reduce clutter in Idris2 flycheck error message, ELPA Syncer, 2023/01/18
- [nongnu] elpa/idris-mode 1b5a537f0a 06/10: [ flycheck ] Remove unused var `flycheck-idris2-executable`, ELPA Syncer, 2023/01/18
- [nongnu] elpa/idris-mode 71d3a07f62 07/10: Fix warning flycheck error pattern for Idris 1, ELPA Syncer, 2023/01/18
- [nongnu] elpa/idris-mode ed88191c43 01/10: [ flymake ] Improvment to flycheck checkers., ELPA Syncer, 2023/01/18
- [nongnu] elpa/idris-mode 48988fc219 04/10: [ flycheck ] Use source-original in error patterns, ELPA Syncer, 2023/01/18
- [nongnu] elpa/idris-mode 7a7a468000 10/10: Merge pull request #609 from keram/mla-jfdm-fix-flycheck-main, ELPA Syncer, 2023/01/18
- [nongnu] elpa/idris-mode c5f42964bf 02/10: [ flycheck ] patterns work, but issue is parsing the output.,
ELPA Syncer <=