Skip to content

Commit

Permalink
doc/contributing: add unnecessary string conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Apr 30, 2021
1 parent 71b8739 commit 08ab1d9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/contributing/coding-conventions.chapter.md
Expand Up @@ -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.
Expand Down

0 comments on commit 08ab1d9

Please sign in to comment.