Re: incorrect file name in backend_progress.c header

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: incorrect file name in backend_progress.c header
Date: 2021-09-10 18:20:01
Message-ID: 20210910182001.GB26465@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> For the first list, do you want to include the path to the file for
> IDENTIFICATION ?
> If so, I can prepare a patch covering the files in that list.

Since there's so few exceptions to the "rule", I think they should be fixed for
consistency.

Here's an awk which finds a few more - including the one in your original
report.

$ find src -name '*.[ch]' -type f -print0 |xargs -r0 awk '{fn=gensub(".*/", "", "1", FILENAME)} FILENAME~/scripts/{fn=gensub("\\.c", "", 1, fn)} FNR==1 && /---$/{top=1} /\*\//{top=0} !top{next} FNR>1 && FNR<4 && NF==2 && $2!=fn{print FILENAME,"head",fn,$2} /IDENTIFICATION/{getline; if ($0!~FILENAME){print FILENAME,"foot",$2}}'

src/include/utils/dynahash.h head dynahash.h dynahash
src/include/replication/pgoutput.h foot pgoutput.h
src/backend/catalog/pg_publication.c foot pg_publication.c
src/backend/utils/activity/wait_event.c foot src/backend/postmaster/wait_event.c
src/backend/utils/activity/backend_status.c foot src/backend/postmaster/backend_status.c
src/backend/utils/activity/backend_progress.c head backend_progress.c progress.c
src/backend/utils/adt/version.c foot
src/backend/replication/logical/reorderbuffer.c foot src/backend/replication/reorderbuffer.c
src/backend/replication/logical/snapbuild.c foot src/backend/replication/snapbuild.c
src/backend/replication/logical/logicalfuncs.c foot src/backend/replication/logicalfuncs.c
src/backend/optimizer/util/inherit.c foot src/backend/optimizer/path/inherit.c
src/backend/optimizer/util/appendinfo.c foot src/backend/optimizer/path/appendinfo.c
src/backend/commands/publicationcmds.c foot publicationcmds.c
src/backend/commands/subscriptioncmds.c foot subscriptioncmds.c
src/interfaces/libpq/fe-misc.c head fe-misc.c FILE
src/bin/scripts/common.c head common common.c
src/port/pgcheckdir.c head pgcheckdir.c src/port/pgcheckdir.c

--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhihong Yu 2021-09-10 18:28:17 Re: incorrect file name in backend_progress.c header
Previous Message Zhihong Yu 2021-09-10 18:15:42 Re: incorrect file name in backend_progress.c header