Re: On /*----- comments

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: On /*----- comments
Дата
Msg-id 2E89E820-9B4E-451B-8907-92C155FD6D5B@yesql.se
обсуждение исходный текст
Ответ на Re: On /*----- comments  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: On /*----- comments  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
> On 30 Jun 2023, at 17:22, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Seems reasonable; the trailing dashes eat a line without adding much.

+1

> Should we also provide specific guidance about how many leading dashes
> to use for this?  I vaguely recall that pgindent might only need one,
> but I think using somewhere around 5 to 10 looks better.

There are ~50 different lenghts used when looking at block comments from line 2
(to avoid the file header comment) and onwards in files, the ones with 10 or
more occurrences are:

 145 /*----------
  78 /*------
  76 /*-------------------------------------------------------------------------
  37 /*----------------------------------------------------------
  29 /*------------------------
  23 /*----------------------------------------------------------------
  22 /*--------------------
  21 /*----
  15 /*---------------------------------------------------------------------
  14 /*--
  13 /*-------------------------------------------------------
  13 /*---
  12 /*----------------------

10 leading dashes is the clear winner so recommending that for new/edited
comments seem like a good way to reduce churn.

Looking at line 1 comments for fun shows pretty strong consistency:

1611 /*-------------------------------------------------------------------------
  22 /*--------------------------------------------------------------------------
  18 /*------------------------------------------------------------------------
  13 /*--------------------------------------------------------------------
   7 /*---------------------------------------------------------------------------
   4 /*-----------------------------------------------------------------------
   4 /*----------------------------------------------------------------------
   1 /*--------------------------

plpy_util.h being the only one that sticks out.

--
Daniel Gustafsson




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Cleaning up threading code
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Outdated description of PG_CACHE_LINE_SIZE