From 08ab1d9572735f9a1218ffaa1ade0ac3e9b60167 Mon Sep 17 00:00:00 2001 From: Sandro Date: Fri, 30 Apr 2021 11:31:48 +0200 Subject: [PATCH] doc/contributing: add unnecessary string conversions --- doc/contributing/coding-conventions.chapter.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/contributing/coding-conventions.chapter.md b/doc/contributing/coding-conventions.chapter.md index eccf4f7436ec..c29b40c298e9 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.