summaryrefslogtreecommitdiff
path: root/docs/developer/tools/linting.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/developer/tools/linting.md')
-rw-r--r--docs/developer/tools/linting.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/developer/tools/linting.md b/docs/developer/tools/linting.md
new file mode 100644
index 0000000..47420bb
--- /dev/null
+++ b/docs/developer/tools/linting.md
@@ -0,0 +1,21 @@
+# Linting
+
+We use automated tools, rather than human effort, to spot possible bugs or dubious structural choices, where possible. This is handled by three tools:
+
+- Javascript is linted using [eslint].
+- Rust is linted using [cargo check] and [clippy].
+
+[eslint]: https://eslint.org/
+[cargo check]: https://doc.rust-lang.org/cargo/commands/cargo-check.html
+[clippy]: https://doc.rust-lang.org/cargo/commands/cargo-clippy.html
+
+## Tools
+
+- To check for detectable lints, run
+ `tools/check-lint`. This should be run whenever making changes, and is part of the optional
+ `git-hooks/pre-commit` hook script.
+
+- To fix lints that have automatic fixes, run
+ `tools/delint`.
+
+You can also run the individual lint tools directly. The tool scripts listed above contain the specific commands needed.