summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.codespellrc5
-rw-r--r--release/checks/codespell.nix17
-rw-r--r--release/checks/default.nix2
3 files changed, 24 insertions, 0 deletions
diff --git a/.codespellrc b/.codespellrc
new file mode 100644
index 0000000..7240720
--- /dev/null
+++ b/.codespellrc
@@ -0,0 +1,5 @@
+# SPDX-FileCopyrightText: 2023 Alyssa Ross <hi@alyssa.is>
+# SPDX-License-Identifier: CC0-1.0
+
+[codespell]
+ignore-words-list = crate,rouge
diff --git a/release/checks/codespell.nix b/release/checks/codespell.nix
new file mode 100644
index 0000000..01aeb8c
--- /dev/null
+++ b/release/checks/codespell.nix
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: MIT
+# SPDX-FileCopyrightText: 2023 Alyssa Ross <hi@alyssa.is>
+
+import ../../lib/call-package.nix ({ srcWithNix, lib, runCommand, codespell }:
+
+runCommand "spectrum-codespell" {
+  src = lib.fileset.toSource {
+    root = ../..;
+    fileset = srcWithNix;
+  };
+  nativeBuildInputs = [ codespell ];
+} ''
+  cd $src
+  codespell
+  touch $out
+''
+) (_: {})
diff --git a/release/checks/default.nix b/release/checks/default.nix
index c200293..57170f5 100644
--- a/release/checks/default.nix
+++ b/release/checks/default.nix
@@ -6,6 +6,8 @@ import ../../lib/call-package.nix ({ callSpectrumPackage }:
 {
   recurseForDerivations = true;
 
+  codespell = callSpectrumPackage ./codespell.nix {};
+
   doc-links = callSpectrumPackage ./doc-links.nix {};
 
   doc-anchors = callSpectrumPackage ./doc-anchors.nix {};