branch: elpa/projectile
commit f12fdae30a36e3614fa6944969bf37dec9998301
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Support slnx files for dotnet-sln project types (#1971)
---
 CHANGELOG.md            | 1 +
 projectile.el           | 5 +++--
 test/projectile-test.el | 8 ++++++++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e8f4ea2b8..f60812291b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,6 +37,7 @@
 * **[Breaking]** Bump minimum required Emacs version from 26.1 to 27.1. This 
removes ~30 lines of compatibility code (fileloop fallback, `time-convert` 
fallback, `projectile-flatten` shim) and fixes the `tags-query-replace` FIXME 
in `projectile-replace-regexp`.
 * Add `compat` as a dependency, enabling the use of modern Emacs APIs (e.g. 
`string-replace`) on older Emacs versions.
 * Replace most `cl-lib` sequence functions with `seq.el` equivalents 
(`seq-filter`, `seq-remove`, `seq-some`, `seq-find`, `seq-sort`, `seq-every-p`, 
`seq-difference`) and convert `cl-case` to `pcase`.
+* [#1971](https://github.com/bbatsov/projectile/pull/1971): Support `slnx` 
files for dotnet project types.
 * [#1958](https://github.com/bbatsov/projectile/issues/1958): Exclude 
`.projectile-cache.eld` from search results (ripgrep/ag/grep) by default.
 * [#1957](https://github.com/bbatsov/projectile/pull/1957): Add `:caller` 
information to calls to `ivy-read` (used by packages like `ivy-rich`).
 * [#1947](https://github.com/bbatsov/projectile/issues/1947): 
`projectile-project-name` should be marked as safe.
diff --git a/projectile.el b/projectile.el
index 6c5306bd7a..f6b7e6356a 100644
--- a/projectile.el
+++ b/projectile.el
@@ -3198,7 +3198,8 @@ it acts on the current project."
   "Check if a project contains a .NET solution project marker.
 When DIR is specified it checks DIR's project, otherwise
 it acts on the current project."
-  (or (projectile-verify-file-wildcard "?*.sln" dir)))
+  (or (projectile-verify-file-wildcard "?*.sln" dir)
+      (projectile-verify-file-wildcard "?*.slnx" dir)))
 
 (defun projectile-go-project-p (&optional dir)
   "Check if a project contains Go source files.
@@ -3421,7 +3422,7 @@ a manual COMMAND-TYPE command is created with
                                   :run "dotnet run"
                                   :test "dotnet test")
 (projectile-register-project-type 'dotnet-sln #'projectile-dotnet-sln-project-p
-                                  :project-file "?*.sln"
+                                  :project-file '("?*.sln" "?*.slnx")
                                   :compile "dotnet build"
                                   :run "dotnet run"
                                   :test "dotnet test")
diff --git a/test/projectile-test.el b/test/projectile-test.el
index d896ba3ff5..f35c6a0639 100644
--- a/test/projectile-test.el
+++ b/test/projectile-test.el
@@ -1454,6 +1454,14 @@ Just delegates OPERATION and ARGS for all operations 
except for`shell-command`'.
       (let ((projectile-indexing-method 'native))
         (spy-on 'projectile-project-root :and-return-value (file-truename 
(expand-file-name "project/")))
         (expect (projectile-detect-project-type) :to-equal 'dotnet-sln)))))
+  (it "detects project-type for dotnet slnx projects"
+    (projectile-test-with-sandbox
+     (projectile-test-with-files
+      ("project/"
+       "project/Project.slnx")
+      (let ((projectile-indexing-method 'native))
+        (spy-on 'projectile-project-root :and-return-value (file-truename 
(expand-file-name "project/")))
+        (expect (projectile-detect-project-type) :to-equal 'dotnet-sln)))))
   (it "detects project-type for Julia PkgTemplates.jl projects"
     (projectile-test-with-sandbox
      (projectile-test-with-files

Reply via email to