branch: externals/vc-jj
commit a1c03eec1f2bbff4f8e5cd821f97ce047bb8eeb6
Author: Rudi Schlatte <[email protected]>
Commit: Rudi Schlatte <[email protected]>

    Add test coverage
    
    Record test coverage via eldev, undercover
---
 .gitignore |  7 +++++++
 Eldev      | 18 ++++++++++++++++++
 README.org |  9 +++++++++
 3 files changed, 34 insertions(+)

diff --git a/.gitignore b/.gitignore
index 8db3605ed3..0a413409e9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,10 @@
 # ELPA-generated files.
 /vc-jj-autoloads.el
 /vc-jj-pkg.el
+
+# Eldev files
+/.eldev
+/Eldev-local
+
+# Test coverage reports (eldev test --undercover simplecov,dontsend)
+/coverage
diff --git a/Eldev b/Eldev
new file mode 100644
index 0000000000..0bcb1bd936
--- /dev/null
+++ b/Eldev
@@ -0,0 +1,18 @@
+; -*- mode: emacs-lisp; lexical-binding: t -*-
+
+;; Install eldev: https://emacs-eldev.github.io/eldev/#installation
+
+;; Uncomment some calls below as needed for your project.
+(eldev-use-package-archive 'gnu-elpa)
+;(eldev-use-package-archive 'nongnu-elpa)
+;(eldev-use-package-archive 'melpa)
+
+(eldev-use-plugin 'autoloads)
+;; Turn on test coverage.
+(eldev-use-plugin 'undercover)
+
+;; Use 'M-x coverage-mode' to see test coverage in 'vc-jj.el'.  Run
+;; the following command to generate the 'coverage/.resultset.json'
+;; file used by coverage-mode:
+
+;; eldev test --undercover simplecov,dontsend
diff --git a/README.org b/README.org
index ca2970378e..3bdb0d97f7 100644
--- a/README.org
+++ b/README.org
@@ -32,6 +32,15 @@ the standard FSF copyright assignment in place; feel free to 
contact
 us for details.  Note that "trivial" (below 15 lines or obvious) code
 suggestions in bug reports are fine.
 
+** Development
+
+The code in file =vc-jj.el= is organized according to the structure set
+out in the preamble of the file =vc.el= in the Emacs source tree.
+
+Test code coverage can be checked via the 
[[https://emacs-eldev.github.io/eldev/][Eldev]] tool and 
[[https://github.com/trezona-lecomte/coverage][coverage]]:
+run ~eldev test --undercover simplecov,dontsend~ in the project root
+directory then activate =coverage-mode= inside =vc-jj.el=.
+
 * Other Emacs packages for Jujutsu
 
 The scope of the =vc-jj.el= project is to add jj support to the Emacs

Reply via email to