chipyard icon indicating copy to clipboard operation
chipyard copied to clipboard

Makefile comment line-lengths (style discussion)

Open ssteffl opened this issue 5 years ago • 5 comments

In a recent PR, I rewrote the verilator Makefile, and in the course of doing so I shorted all line-lengths to < 80 characters. including comment lines.

It was suggested I open up a style ticket to discuss why we are using 89-character comment lines in the first place, and probe for any objections to reducing these to < 80 characters (either 72 or 78 characters).

Many editors allow vertical window splitting to view code side by side (including vim, which I use). I use this feature 100% of the time i have vim open. But long lines in files make viewing these files annoying.

I believe it is unlikely that shortening the comment lines will have any adverse effects on those who do not vertically split their editor window, while only benefiting those who do.

ssteffl avatar May 24 '20 02:05 ssteffl

why we are using 89-character comment lines in the first place

I'm 99% sure 89 is arbitrary- somebody held the # key down for a few seconds and every subsequent change just copied that line.

I believe it is unlikely that shortening the comment lines will have any adverse effects on those who do not vertically split their editor window, while only benefiting those who do.

I, and I'm reasonably confident almost everyone else, use vertical splits and have never been bothered by this, but I have no opposition to making the change as long as it's in its own style PR and globally changes all files in the repo.

jwright6323 avatar May 24 '20 04:05 jwright6323

I also use vertical splits constantly and it is a very slight annoyance that some lines are over 80 characters, but I encounter lots of files like that so I'm used to it.

That being said I think a single PR that changes all comment lines to 72 characters would be my preferred solution now that we are changing it.

colinschmidt avatar May 24 '20 04:05 colinschmidt

72 characters is also my preference.

a0u avatar May 24 '20 05:05 a0u

Yes this was arbitrary and doesn't affect me so I don't care about lengths.

abejgonzalez avatar May 25 '20 22:05 abejgonzalez

I'm fine with this for makefiles. Hard veto on applying sub 80 lines to scala files. Edit: comments would be alright.

davidbiancolin avatar May 25 '20 23:05 davidbiancolin