Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: How long is "one line"? #31728

Open
chris-martin opened this issue Nov 16, 2017 · 5 comments
Open

Documentation: How long is "one line"? #31728

chris-martin opened this issue Nov 16, 2017 · 5 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@chris-martin
Copy link
Contributor

Apologies for opening up an annoying bikeshed issue here, but I hope this will be a quick question: What do we consider the ideal maximum line length to be for Nix code in this repo? I ask because there are a couple places in the manual that seem to imply that somebody has a line length in mind:

  1. The doc for the description field to mkDerivation:

    A short (one-line) description of the package.

  2. There's a place in the style guide that says:

    if they don't fit on one line

As a contributor, I don't care what it is, I just want to make people happy, so can we write that number down somewhere? I'll be glad to PR the docs.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Nov 16, 2017

I don't think there is an official line length.
In that case I propose the standard 80 characters per lines. You can easily fit multiples files in a single screen and generally longer lines can be refactored in a cleaner way.

@1pakch
Copy link
Contributor

1pakch commented Nov 16, 2017

I asked myself the same question and would prefer if there was an official position on that (or a style guide in general).

Personally, I like 80 too. Urls are often longer and I don't know a good workaround. Do you?

@7c6f434c
Copy link
Member

I wonder if «one-line description» is supposed to be shorter than a line of code…

Personally, I feel like letting URLs wrap around the line end is the lesser annoyance.

@Ekleog
Copy link
Member

Ekleog commented Jun 3, 2018

(triage) I guess this would be better opened as a RFC, this way bikeshedding can occur in public at an easily-to-access place; while here the issue is just going to be lost to all except people ping-ed by codetriage :)

@stale
Copy link

stale bot commented Jun 4, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

5 participants