Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 63c7ed978828
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 064bd03b8c2f
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 27, 2018

  1. doc: tweak the coding conventions (#51113)

    Encouraging to put container elements on their own lines to minimize
    diffs, merge conflicts and making re-ordering easier.
    
    Nix doesn't suffer the restrictions of other languages where commas are
    used to separate list items.
    zimbatm authored Nov 27, 2018
    Copy the full SHA
    064bd03 View commit details
Showing with 17 additions and 12 deletions.
  1. +17 −12 doc/coding-conventions.xml
29 changes: 17 additions & 12 deletions doc/coding-conventions.xml
Original file line number Diff line number Diff line change
@@ -56,25 +56,30 @@ foo { arg = ...; }
or list elements should be aligned:
<programlisting>
# A long list.
list =
[ elem1
elem2
elem3
];
list = [
elem1
elem2
elem3
];

# A long attribute set.
attrs =
{ attr1 = short_expr;
attr2 =
if true then big_expr else big_expr;
};

# Alternatively:
attrs = {
attr1 = short_expr;
attr2 =
if true then big_expr else big_expr;
};

# Combined
listOfAttrs = [
{
attr1 = 3;
attr2 = "fff";
}
{
attr1 = 5;
attr2 = "ggg";
}
];
</programlisting>
</para>
</listitem>