Re: Coding Style updates
Amos Jeffries <[email protected]> Mon, 16 Aug 2021 13:07:30 +1200
| Newsgroups | gmane.comp.web.squid.devel |
|---|---|
| Message-ID | <[email protected]> |
On 15/08/21 3:44 am, Alex Rousskov wrote: > On 8/12/21 8:31 PM, Amos Jeffries wrote: > >> I am aware that Factory ... prefers the one-line style. > > Factory does not prefer the one-line style. > The existence of such a style requirement on Factory developers, and thus need for Squid code to match it for ease of future bug fixing, was given to me as a reason for ICAP and eCAP feature code staying in the Factory supplied one-line format despite the remainder of Squid code back then using two-line. So, between your two responses I gather that there will be no push-back on a PR adding enforcement of two-line function/method definitions by astyle 3.1. > > >> If we don't have agreement on a change I will >> implement enforcement of the existing style policy. > > I cannot find any existing/official rules regarding single- or > multi-line function definitions in [1]. Where are they currently stated? > > [1] https://wiki.squid-cache.org/SquidCodingGuidelines > It appears to be one of the policy rules not copied over to that page from the Squid-2 page. "Follow the coding style of the rest of the code." ... the bulk of Squid code uses two-line. Only the ICAP,eCAP, SSL-Bump code received in large PRs from Factory or third-party imported libraries (also large imports) use one-line. Amos