[ITK] Word wrap for commit text at itk.org/gitweb and review.source.kitware.com?

Matt McCormick matt.mccormick at kitware.com
Thu Feb 26 21:24:19 EST 2015


Hi Niels,

On Thu, Feb 26, 2015 at 11:21 AM, Niels Dekker <niels-xtk at xs4all.nl> wrote:
> Thanks for your reply, Matt. I agree that it's useful to have a maximum
> line length for C++ code, especially because C++ code may not look so well
> after word wrapping. However, for informative text, like commit messages,
> I still think automatic word wrapping would be preferable to asking each
> committer to insert hard-coded line breaks into paragraphs, or even into
> sentences.
>
> Automatic word wrapping techniques were developed by D.E. Knuth et al,
> more than three decades ago
> <http://en.wikipedia.org/wiki/Line_wrap_and_word_wrap>, so I'm surprised
> that many tools still do not implement them.

Long lines are at a disadvantage for the advanced keyboard-based
editors like vim and emacs -- lines are a primary landmark for
navigation in these environments.

> It seems to me that the missing word wrapping in
> http://review.source.kitware.com/#/c/19311/ and
> http://itk.org/gitweb?p=ITK.git;a=commit;h=bbecc3b7cca9f85914235dac2d6b9e80d0d44dda
> might both be caused by HTML bugs.  If that's the case, I'd probably have
> to report them elsewhere, right?

If there are patches that are upstreamed and accepted, that would be
excellent, but it is likely to be a hard sell.

Thanks,
Matt


> Kind regards, Niels
>
>> Hi Niels,
>>
>> It would be nice to use automatic wrapping everywhere, but
>> unfortunately many tools do not support it, so we use the hard
>> wrapping. ITK style guidelines [1] [2], specify line lengths of 79
>> characters for things like commit messages and up to 200 characters
>> for code lines.
>>
>> Thanks for the feedback,
>> Matt
>>
>> [1] http://www.itk.org/Wiki/ITK/Coding_Style_Guide
>>
>> [2]
>> http://itk.org/gitweb?p=ITK.git;a=blob_plain;f=Documentation/Style.pdf;hb=HEAD
>>
>> On Wed, Feb 25, 2015 at 6:50 AM, Niels Dekker wrote:
>>> The commit log text of the commit I submitted to Gerrit yesterday had a
>>> paragraph of more than 280 characters, without "hard" line breaks. Now
>>> it appears as a single line, without any line wrapping, both at Gerrit,
>>> http://review.source.kitware.com/#/c/19311/ and
>>> http://itk.org/gitweb?p=ITK.git;a=commit;h=bbecc3b7cca9f85914235dac2d6b9e80d0d44dda
>>> At least that's how I see it on Windows7 + Firefox 35. Which makes
>>> reading the text a bit uncomfortable: I'd have to use the horizontal
>>> scrollbar of the web browser to get to the end of the line.
>>>
>>> Do other platforms/browsers/devices display this paragraph in a more
>>> convenient way, by adding word wrapping?
>>>
>>> Otherwise, is it possible to enable word wrapping for itk.org/gitweb and
>>> review.source.kitware.com?
>>>
>>> I prefer automatic word wrapping to hard line breaks, because the
>>> optimal position of a line break within a paragraph very much depends
>>> on the viewing device, the viewing software, and the preference of the
>>> user who is reading the text.
>>>
>>> See also http://en.wikipedia.org/wiki/Line_wrap_and_word_wrap
>>>
>>> BTW: Here's the log text from
>>> http://review.source.kitware.com/#/c/19311/ :
>>>   ------------------------------------------------------------
>>> The original itk_module_warnings_disable macro would remove all
>>> "/W[0-4]" compiler flags, but then Visual Studio (both VS2010
>>> and VS2013) would automatically (!) add "/W1", causing these
>>> "D9025" warnings. Visual Studio does not do so when
>>> itk_module_warnings_disable adds "/W0" instead.
>>>
>>> Discussed at "[ITK] ITKModuleMacros.cmake
>>> macro(itk_module_warnings_disable)
>>> MSVC warning D9025: overriding '/W1' with '/w'",
>>> http://public.kitware.com/pipermail/community/2015-February/008349.html
>>> Mike Jackson confirmed the issue at
>>> http://public.kitware.com/pipermail/community/2015-February/008361.html
>>>   ------------------------------------------------------------
>>>
>>> Kind regards, Niels
>>> --
>>> Niels Dekker
>>> Scientific programmer at LKEB, Leiden University Medical Center
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community


More information about the Community mailing list