diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-04-30 11:31:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 11:31:48 +0200 |
commit | 08ab1d9572735f9a1218ffaa1ade0ac3e9b60167 (patch) | |
tree | acc46214723c0db2cf9efb371baece8210573a61 /doc/contributing | |
parent | 71b873942ef95937bed2400141c7fa2e22e406dd (diff) | |
download | nixpkgs-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/contributing')
-rw-r--r-- | doc/contributing/coding-conventions.chapter.md | 12 |
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. |