Skip to content

Commit

Permalink
Fix typo on clear-ns
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdallo committed Jan 23, 2023
1 parent df8adb8 commit 7077ce9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cli/integration-test/integration/api/clean_ns_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
(with-open [rdr (lsp/cli! "clean-ns"
"--project-root" h/root-project-path
"--namespace" "sample-test.api.clean-ns.a")]
(is (h/string= "Cleared 1 namespaces\n" (slurp rdr)))
(is (h/string= "Cleaned 1 namespaces\n" (slurp rdr)))
(is (h/string= a-expected-text (slurp a-subject-path))))
(spit a-subject-path a-subject-text))
(testing "passing multiple namespaces but only one is cleanable"
(with-open [rdr (lsp/cli! "clean-ns"
"--project-root" h/root-project-path
"--namespace" "sample-test.api.clean-ns.b"
"--namespace" "sample-test.api.clean-ns.a")]
(is (h/string= "Cleared 1 namespaces\n" (slurp rdr)))
(is (h/string= "Cleaned 1 namespaces\n" (slurp rdr)))
(is (h/string= a-expected-text (slurp a-subject-path))))
(spit a-subject-path a-subject-text))
(testing "when running with dry"
Expand Down
2 changes: 1 addition & 1 deletion lib/src/clojure_lsp/internal_api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
(mapcat #(dep-graph/ns-names-for-uri db (:uri %)))
(run! #(cli-println options "Cleaned" %)))
{:result-code 0
:message-fn (constantly (format "Cleared %s namespaces" (count edits)))
:message-fn (constantly (format "Cleaned %s namespaces" (count edits)))
:edits edits}))
{:result-code 0 :message-fn (constantly "Nothing to clear!")})))

Expand Down

0 comments on commit 7077ce9

Please sign in to comment.