From: Junio C Hamano Date: Wed, 26 Oct 2022 06:46:07 GMT Subject: Re: [PATCH v3 4/4] Documentation: add lint-fsck-msgids Message-ID: In-Reply-To: Jeff King 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.