diff options
| author | take <bararararatty@gmail.com> | 2026-01-09 22:35:28 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-09 15:35:28 +0200 |
| commit | f19262ae3f2764f10a4d087497058cdb9a0fd3df (patch) | |
| tree | d7c0d0460b3f71a8281e92246484a7052b5340d5 /projectile.el | |
| parent | 613f0332ec4079914e27b1ddbef9cb7a957a7ffe (diff) | |
Add projectile-cache-file to projectile-globally-ignored-files default (#1966)
- Include projectile-cache-file in projectile-globally-ignored-files default
- Add :safe predicate to allow dir-locals configuration
- Add tests for default values and :safe predicate validation
- Update related file and test matching functions to use let* variants
- Improve variable binding consistency and future compatibility
Diffstat (limited to 'projectile.el')
| -rw-r--r-- | projectile.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/projectile.el b/projectile.el index 176e731..5d8ce40 100644 --- a/projectile.el +++ b/projectile.el @@ -405,10 +405,11 @@ Similar to '#' in .gitignore files." :package-version '(projectile . "2.2.0")) (defcustom projectile-globally-ignored-files - (list projectile-tags-file-name) + (list projectile-tags-file-name projectile-cache-file) "A list of files globally ignored by projectile. Note that files aren't filtered if `projectile-indexing-method' is set to `alien'." + :safe (lambda (x) (not (remq t (mapcar #'stringp x)))) :group 'projectile :type '(repeat string)) @@ -2802,7 +2803,7 @@ If KIND is not provided, a list of possible kinds can be chosen." :caller 'projectile-read-file)))) (error "No related files found"))) - (if-let ((candidates (projectile--related-files file kind))) + (if-let* ((candidates (projectile--related-files file kind))) (projectile-expand-root (projectile--choose-from-candidates candidates :caller 'projectile-read-file)) (error "No matching related file as `%s' found for project type `%s'" @@ -4237,12 +4238,12 @@ The precedence for determining implementation files to return is: (defun projectile-find-matching-test (impl-file) "Compute the name of the test matching IMPL-FILE." - (when-let ((candidates (projectile--find-matching-test impl-file))) + (when-let* ((candidates (projectile--find-matching-test impl-file))) (projectile--choose-from-candidates candidates :caller 'projectile-read-file))) (defun projectile-find-matching-file (test-file) "Compute the name of a file matching TEST-FILE." - (when-let ((candidates (projectile--find-matching-file test-file))) + (when-let* ((candidates (projectile--find-matching-file test-file))) (projectile--choose-from-candidates candidates :caller 'projectile-read-file))) (defun projectile-grep-default-files () |
