emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/mentor b453874099: Add codespell action for GitHub CI


From: ELPA Syncer
Subject: [nongnu] elpa/mentor b453874099: Add codespell action for GitHub CI
Date: Fri, 23 Dec 2022 23:59:14 -0500 (EST)

branch: elpa/mentor
commit b4538740999ab471c7d19bc277e576ac3ed15a93
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Add codespell action for GitHub CI
---
 .github/workflows/codespell.yml | 21 +++++++++++++++++++++
 test/mentor-tests.el            | 12 ++++++------
 2 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
new file mode 100644
index 0000000000..3f82a7af3d
--- /dev/null
+++ b/.github/workflows/codespell.yml
@@ -0,0 +1,21 @@
+# GitHub Action to automate the identification of common misspellings in text 
files.
+# https://github.com/codespell-project/actions-codespell
+# https://github.com/codespell-project/codespell
+name: codespell
+on: [ push, pull_request ]
+permissions: {}
+jobs:
+  codespell:
+    name: Check for spelling errors
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout url-scgi
+        uses: actions/checkout@v3
+        with:
+          persist-credentials: false
+
+      - name: Run codespell
+        uses: codespell-project/actions-codespell@master
+        with:
+          check_filenames: true
+          builtin: clear,rare
diff --git a/test/mentor-tests.el b/test/mentor-tests.el
index 0502bc1a0b..e58d739c71 100644
--- a/test/mentor-tests.el
+++ b/test/mentor-tests.el
@@ -95,12 +95,12 @@
 
 (ert-deftest mentor-rtorrent-enforce-length ()
   (should (equal (mentor-enforce-length nil 2)    "  "))
-  (should (equal (mentor-enforce-length "foo" 0)  ""))
-  (should (equal (mentor-enforce-length "foo" 2)  "fo"))
-  (should (equal (mentor-enforce-length "foo" -2) "fo"))
-  (should (equal (mentor-enforce-length "foo" 3)  "foo"))
-  (should (equal (mentor-enforce-length "foo" -4) "foo "))
-  (should (equal (mentor-enforce-length "foo" 4)  " foo")))
+  (should (equal (mentor-enforce-length "abc" 0)  ""))
+  (should (equal (mentor-enforce-length "abc" 2)  "ab"))
+  (should (equal (mentor-enforce-length "abc" -2) "ab"))
+  (should (equal (mentor-enforce-length "abc" 3)  "abc"))
+  (should (equal (mentor-enforce-length "abc" -4) "abc "))
+  (should (equal (mentor-enforce-length "abc" 4)  " abc")))
 
 (provide 'mentor-tests)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]