Skip to content

Commit 46f5419

Browse files
committed
[Fix #426] Expose variable to ignore paths in the middleware
This makes it possible to easily exclude certain files and directories for analysis.
1 parent a0a1e19 commit 46f5419

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Unreleased
44
- Hotload dependency temporarily disabled to make the middleware run on Java 10.
55

6-
- [#415](https://github.com/clojure-emacs/clj-refactor.el/issues/415) Support for deps.edn - based projects
6+
- [#426](https://github.com/clojure-emacs/clj-refactor.el/issues/426) New variable, `cljr-middleware-ignored-paths`, to make the middleware ignore certain paths.
77
- [#408](https://github.com/clojure-emacs/clj-refactor.el/pull/408) New `cljr-before-warming-ast-cache-hook`, `cljr-after-warming-ast-cache-hook` callbacks around AST warming.
88
- [#394](https://github.com/clojure-emacs/clj-refactor.el/issues/394) New config option `cljr-assume-language-context`: by default, when clj-refactor encounters an ambiguous context (clj vs cljs) it creates a popup asking user which context is meant. If this option is changed to "clj" or "cljs", clj-refactor will use that as the assumed context in such ambigous cases.
99
- [#391](https://github.com/clojure-emacs/clj-refactor.el/issues/391) Prevent refactor-nrepl from being injected when starting a REPL outside a project, and add an option `cljr-suppress-outside-project-warning` to suppress the resultant warning.

clj-refactor.el

+7
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,12 @@ if it appears to be unused."
286286
:group 'cljr
287287
:type 'hook)
288288

289+
(defcustom cljr-middleware-ignored-paths nil
290+
"List of (Java style) regexes to paths that should be ignored
291+
by the middleware."
292+
:group 'cljr
293+
:type '(repeat string))
294+
289295
;;; Buffer Local Declarations
290296

291297
;; tracking state of find-symbol buffer
@@ -2484,6 +2490,7 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-promote-function
24842490
"line" line
24852491
"column" column
24862492
"name" symbol
2493+
"ignore-paths" cljr-middleware-ignored-paths
24872494
"ignore-errors"
24882495
(when (or cljr-find-usages-ignore-analyzer-errors cljr-ignore-analyzer-errors) "true"))))
24892496
(with-current-buffer (cider-current-repl-buffer)

0 commit comments

Comments
 (0)