summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-04-30 11:31:48 +0200
committerGitHub <noreply@github.com>2021-04-30 11:31:48 +0200
commit08ab1d9572735f9a1218ffaa1ade0ac3e9b60167 (patch)
treeacc46214723c0db2cf9efb371baece8210573a61 /doc
parent71b873942ef95937bed2400141c7fa2e22e406dd (diff)
downloadnixpkgs-08ab1d9572735f9a1218ffaa1ade0ac3e9b60167.tar
nixpkgs-08ab1d9572735f9a1218ffaa1ade0ac3e9b60167.tar.gz
nixpkgs-08ab1d9572735f9a1218ffaa1ade0ac3e9b60167.tar.bz2
nixpkgs-08ab1d9572735f9a1218ffaa1ade0ac3e9b60167.tar.lz
nixpkgs-08ab1d9572735f9a1218ffaa1ade0ac3e9b60167.tar.xz
nixpkgs-08ab1d9572735f9a1218ffaa1ade0ac3e9b60167.tar.zst
nixpkgs-08ab1d9572735f9a1218ffaa1ade0ac3e9b60167.zip
doc/contributing: add unnecessary string conversions
Diffstat (limited to 'doc')
-rw-r--r--doc/contributing/coding-conventions.chapter.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/contributing/coding-conventions.chapter.md b/doc/contributing/coding-conventions.chapter.md
index eccf4f7436e..c29b40c298e 100644
--- a/doc/contributing/coding-conventions.chapter.md
+++ b/doc/contributing/coding-conventions.chapter.md
@@ -169,6 +169,18 @@
   })
   ```
 
+- Unnecessary string conversions should be avoided. Do
+
+  ```nix
+  rev = version;
+  ```
+
+  instead of
+
+  ```nix
+  rev = "${version}";
+  ```
+
 - Arguments should be listed in the order they are used, with the exception of `lib`, which always goes first.
 
 - Prefer using the top-level `lib` over its alias `stdenv.lib`. `lib` is unrelated to `stdenv`, and so `stdenv.lib` should only be used as a convenience alias when developing to avoid having to modify the function inputs just to test something out.