[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint be3979a 19/44: Check TRIM argument of `split-str
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/relint be3979a 19/44: Check TRIM argument of `split-string' as well |
Date: |
Tue, 26 Mar 2019 12:57:27 -0400 (EDT) |
branch: externals/relint
commit be3979af7f49b770e0548a9c249c5bcc08d5e97a
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Check TRIM argument of `split-string' as well
---
trawl.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/trawl.el b/trawl.el
index 35923b0..5dd3f46 100644
--- a/trawl.el
+++ b/trawl.el
@@ -499,11 +499,19 @@
(`(,(or `split-string `split-string-and-unquote
`string-trim-left `string-trim-right
`directory-files-recursively)
- ,_ ,re-arg . ,_)
+ ,_ ,re-arg . ,rest)
(unless (and (symbolp re-arg)
(memq re-arg trawl--checked-variables))
(trawl--check-re re-arg (format "call to %s" (car form))
- file pos (cons 2 path))))
+ file pos (cons 2 path)))
+ ;; split-string has another regexp argument (trim, arg 4)
+ (when (and (eq (car form) 'split-string)
+ (cadr rest))
+ (let ((trim (cadr rest)))
+ (unless (and (symbolp trim)
+ (memq trim trawl--checked-variables))
+ (trawl--check-re trim (format "call to %s" (car form))
+ file pos (cons 4 path))))))
(`(,(or `defvar `defconst `defcustom)
,name ,re-arg . ,rest)
(when (symbolp name)
- [elpa] externals/relint 4dbcad9 24/44: Increment version to 1.2, (continued)
- [elpa] externals/relint 4dbcad9 24/44: Increment version to 1.2, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint 104e66c 15/44: Fix bugs in evaluation of `rx' and `rx-to-strings', Mattias Engdegård, 2019/03/26
- [elpa] externals/relint 3f8509a 13/44: Add more functions to check for regexp arguments, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint f8878ca 16/44: Report rx errors in the result buffer, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint 8e37762 18/44: Protect against improper lists in function calls, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint 66522ca 12/44: Increment version to 1.1, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint 683f31b 28/44: Increment version to 1.3, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint ac5d0cf 25/44: Add more safe functions, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint 02bf0ba 21/44: Use explicit list of pure functions, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint 7d0e177 20/44: Rewrite the higher-order function handling, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint be3979a 19/44: Check TRIM argument of `split-string' as well,
Mattias Engdegård <=
- [elpa] externals/relint 5143edf 17/44: Fix indentation accidents, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint d6320f9 14/44: Detect functions with regexp arguments, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint d19133e 09/44: Better variable name patterns, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint d4d8f97 11/44: Eval mapcar and mapcan with partial-evaluated lists, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint 34304b4 08/44: Add (provides) line to make file importable, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint 62ca3d4 05/44: Slight performance improvement, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint 6ab713e 07/44: Reinstate erroneously removed line, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint cb1fdc5 06/44: Add caret pointing out the error in the quoted regexp, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint b4fc385 04/44: Rename trawl--batch to trawl-batch, Mattias Engdegård, 2019/03/26
- [elpa] externals/relint 0214845 01/44: Move to github, Mattias Engdegård, 2019/03/26