Re: [PATCH v3 4/4] Documentation: add lint-fsck-msgids
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 26, 2022, 06:46 UTC
- Message-ID
- <xmqqk04nkrps.fsf@gitster.g>
- In-Reply-To
- <Y1jG8p1aARb9+CV+@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Another alternative is to generate the doc from the code, rather than > the other way around.
Yup, that indeed was what I envisioned in the "Possible future directions" comment in the cover letter. It might not even be bad to do
#define FOREACH_FSCK_MSG_ID(FUNC) \
/* fatal errors */ \
FUNC(NUL_IN_HEADER, FATAL, N_("NUL byte exists in the object header.")) \
FUNC(UNTERMINATED_HEADER, FATAL, N_("Missing end-of-line in the object header.")) \
/* errors */ \
FUNC(BAD_DATE, ERROR, N_("Invalid date format in an author/committer line.")) \
...as some of the users of the macro may have use of the translatable messages themselves.