[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint ccfc9e0 08/12: Scan all variables whose name con
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/relint ccfc9e0 08/12: Scan all variables whose name contain '-font-lock-keywords' |
Date: |
Thu, 30 Jan 2020 10:53:40 -0500 (EST) |
branch: externals/relint
commit ccfc9e029b1cfbf804988bed121fe1f116ee8348
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Scan all variables whose name contain '-font-lock-keywords'
Previously, only variables ending in -font-lock-keywords were scanned;
this seems to have been too conservative.
---
relint.el | 2 +-
test/1.elisp | 1 +
test/1.expected | 48 +++++++++++++++++++++++++++---------------------
3 files changed, 29 insertions(+), 22 deletions(-)
diff --git a/relint.el b/relint.el
index b59c559..74c0417 100644
--- a/relint.el
+++ b/relint.el
@@ -1525,7 +1525,7 @@ directly."
(symbol-name name)))
(relint--check-list re-arg name file pos (cons 2 path))
(push name relint--checked-variables))
- ((string-match-p (rx "-font-lock-keywords" eos)
+ ((string-match-p (rx "-font-lock-keywords")
(symbol-name name))
(relint--check-font-lock-keywords re-arg name file pos
(cons 2 path))
diff --git a/test/1.elisp b/test/1.elisp
index 9e934ae..f8f7d87 100644
--- a/test/1.elisp
+++ b/test/1.elisp
@@ -29,6 +29,7 @@
(regexp . "[a-Z]"))))
(defconst bad-font-lock-keywords '(("[xx]" . tag) "[yy]"))
+(defconst more-font-lock-keywords-bad '(("[uu]" . tag) "[vv]"))
;; Test variable doc string heuristics.
(defconst bad-var-1 "a^"
diff --git a/test/1.expected b/test/1.expected
index e31af97..9151270 100644
--- a/test/1.expected
+++ b/test/1.expected
@@ -91,64 +91,70 @@
1.elisp:31:34: In bad-font-lock-keywords: Duplicated `y' inside character
alternative (pos 2)
"[yy]"
..^
-1.elisp:34:21: In bad-var-1: Unescaped literal `^' (pos 1)
+1.elisp:32:39: In more-font-lock-keywords-bad (tag): Duplicated `u' inside
character alternative (pos 2)
+ "[uu]"
+ ..^
+1.elisp:32:39: In more-font-lock-keywords-bad: Duplicated `v' inside character
alternative (pos 2)
+ "[vv]"
+ ..^
+1.elisp:35:21: In bad-var-1: Unescaped literal `^' (pos 1)
"a^"
.^
-1.elisp:36:19: In bad-var-2: Duplicated `z' inside character alternative (pos
2)
+1.elisp:37:19: In bad-var-2: Duplicated `z' inside character alternative (pos
2)
"[zz]"
..^
-1.elisp:38:22: In bad-var-3: Reversed range `o-O' matches nothing (pos 1)
+1.elisp:39:22: In bad-var-3: Reversed range `o-O' matches nothing (pos 1)
"[o-O]"
.^
-1.elisp:44:25: In bad-custom-1: Duplicated `n' inside character alternative
(pos 2)
+1.elisp:45:25: In bad-custom-1: Duplicated `n' inside character alternative
(pos 2)
"[nn]"
..^
-1.elisp:48:25: In bad-custom-2: Duplicated `s' inside character alternative
(pos 2)
+1.elisp:49:25: In bad-custom-2: Duplicated `s' inside character alternative
(pos 2)
"[ss]"
..^
-1.elisp:55:9: In bad-custom-3-regexp: Unescaped literal `+' (pos 0)
+1.elisp:56:9: In bad-custom-3-regexp: Unescaped literal `+' (pos 0)
"+a+"
^
-1.elisp:55:9: In bad-custom-3-regexp: Unescaped literal `*' (pos 0)
+1.elisp:56:9: In bad-custom-3-regexp: Unescaped literal `*' (pos 0)
"*b*"
^
-1.elisp:55:9: In bad-custom-3-regexp: Unescaped literal `^' (pos 2)
+1.elisp:56:9: In bad-custom-3-regexp: Unescaped literal `^' (pos 2)
"^c^"
..^
-1.elisp:62:12: In bad-custom-4-regexp: Unescaped literal `+' (pos 0)
+1.elisp:63:12: In bad-custom-4-regexp: Unescaped literal `+' (pos 0)
"+b"
^
-1.elisp:63:25: In bad-custom-5: Unescaped literal `^' (pos 2)
+1.elisp:64:25: In bad-custom-5: Unescaped literal `^' (pos 2)
"^x^"
..^
-1.elisp:67:25: In bad-custom-6: Error: No character class ‘[:bah:]’:
"[[:bah:]]"
-1.elisp:71:25: In bad-custom-7: Duplicated `a' inside character alternative
(pos 2)
+1.elisp:68:25: In bad-custom-6: Error: No character class ‘[:bah:]’:
"[[:bah:]]"
+1.elisp:72:25: In bad-custom-7: Duplicated `a' inside character alternative
(pos 2)
"[aa]"
..^
-1.elisp:78:3: In compilation-error-regexp-alist-alist (aa): Unescaped literal
`^' (pos 1)
+1.elisp:79:3: In compilation-error-regexp-alist-alist (aa): Unescaped literal
`^' (pos 1)
"a^a"
.^
-1.elisp:78:3: In compilation-error-regexp-alist-alist (bb): Unescaped literal
`$' (pos 1)
+1.elisp:79:3: In compilation-error-regexp-alist-alist (bb): Unescaped literal
`$' (pos 1)
"b$b"
.^
-1.elisp:84:3: In define-generic-mode my-mode: Unescaped literal `^' (pos 1)
+1.elisp:85:3: In define-generic-mode my-mode: Unescaped literal `^' (pos 1)
"1^"
.^
-1.elisp:84:3: In define-generic-mode my-mode: Unescaped literal `^' (pos 1)
+1.elisp:85:3: In define-generic-mode my-mode: Unescaped literal `^' (pos 1)
"2^"
.^
-1.elisp:86:3: In define-generic-mode my-mode: Repetition of repetition (pos 2)
+1.elisp:87:3: In define-generic-mode my-mode: Repetition of repetition (pos 2)
"b++"
..^
-1.elisp:92:5: In call to syntax-propertize-rules: Unescaped literal `$' (pos 0)
+1.elisp:93:5: In call to syntax-propertize-rules: Unescaped literal `$' (pos 0)
"$1$"
^
-1.elisp:93:5: In call to syntax-propertize-rules: Unescaped literal `^' (pos 2)
+1.elisp:94:5: In call to syntax-propertize-rules: Unescaped literal `^' (pos 2)
"^2^"
..^
-1.elisp:98:5: In call to syntax-propertize-precompile-rules: Unescaped literal
`$' (pos 0)
+1.elisp:99:5: In call to syntax-propertize-precompile-rules: Unescaped literal
`$' (pos 0)
"$3$"
^
-1.elisp:99:5: In call to syntax-propertize-precompile-rules: Unescaped literal
`^' (pos 2)
+1.elisp:100:5: In call to syntax-propertize-precompile-rules: Unescaped
literal `^' (pos 2)
"^4^"
..^
- [elpa] externals/relint updated (5c6079b -> 3315f03), Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 1103f5c 01/12: Suppress error summary in noninteractive mode if no errors (bug #6), Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 3885977 03/12: Adjust package header, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint f5bbfdb 02/12: Describe exit status in relint-batch doc string, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 2ebd33d 04/12: Disable tests requiring Emacs 27 for the time being (bug #7), Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 800f5cc 06/12: Scan function/macro doc strings for hints to regexp arguments, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint ff06875 09/12: Scan mutation and binding of certain known regexp variables, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint dcb474b 10/12: Detect user-defined regexp-returning functions, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint ccfc9e0 08/12: Scan all variables whose name contain '-font-lock-keywords',
Mattias Engdegård <=
- [elpa] externals/relint 32dbad1 07/12: Scan arguments to syntax-propertize-{precompile-}rules, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 641cf71 05/12: Require Emacs 26.1 (for mapcan), Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 5b684ea 11/12: Require xr 1.15, Mattias Engdegård, 2020/01/30
- [elpa] externals/relint 3315f03 12/12: Increment version to 1.13, Mattias Engdegård, 2020/01/30