branch: externals/relint commit 8ee9f79d4b8cd5b27df1bb6342f4962db1d0930e Author: Mattias Engdegård <matti...@acm.org> Commit: Mattias Engdegård <matti...@acm.org>
Avoid descending into .git/ when looking for .el files This saves quite some time when scanning directories containing lots of git trees. --- relint.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/relint.el b/relint.el index 3b40d12..ee670b7 100644 --- a/relint.el +++ b/relint.el @@ -2328,7 +2328,9 @@ TARGET is the file or directory to use for a repeated run." (defun relint--tree-files (dir) (directory-files-recursively - dir (rx bos (not (any ".")) (* anything) ".el" eos))) + dir (rx bos (not (any ".")) (* anything) ".el" eos) nil + ;; Save time by not pointlessly descending into huge .git directories. + (lambda (s) (not (string-suffix-p "/.git" s))))) (defun relint--scan-buffer (buffer) "Scan BUFFER; return (COMPLAINTS . SUPPRESSED) where