[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Clang-format configuration discussion - pt 1
Hi, On Tue, Nov 14, 2023 at 02:59:35PM +0000, Luca Fancellu wrote: > > > > On 13 Nov 2023, at 16:27, Jan Beulich <jbeulich@xxxxxxxx> wrote: > > > > On 13.11.2023 16:20, Luca Fancellu wrote: > >>> On 13 Nov 2023, at 11:31, Jan Beulich <jbeulich@xxxxxxxx> wrote: > >>> On 08.11.2023 10:53, Luca Fancellu wrote: > >>> -------------------------------------------------------------------------------------------------------------------------------------------------------------- > >>>> > >>>> Standard: C++03 > >>>> > >>>> --- > >>>> From the documentation: Parse and format C++ constructs compatible with > >>>> this standard. > >>> > >>> Since I continue to be puzzled - iirc you said this is because of lack > >>> of availability of "C99" as a value here. What's entirely unclear to > >>> me is: How does this matter to a tool checking coding style (which is > >>> largely about formatting, not any lexical or syntactical aspects)? > >>> > >>>> This value is used also in Linux. > >>> > >>> Considering how different the two styles are, I don't think this is > >>> overly relevant. > >> > >> Ok, maybe I understand your point, you are looking for a reason to declare > >> this configurable instead > >> of not specifying it at all? > > > > Not really, no. Here I was merely saying that with the styles being > > sufficiently different, what Linux uses is probably not very significant > > for our own decision. > > > >> If it’s that, from what I understand clang-format will use the default > >> value if we don’t specify anything > >> for this one, so it will take ‘Latest’. I think we should put a value for > >> this one to fix it and don’t have > >> surprises if that behaviour changes and seeing that also in Linux that > >> value is fixed increased my > >> confidence. > >> > >> However, if you feel that we should not specify it, I’ve done a test and > >> not specifying it is not changing > >> the current output. I can’t say that for a different clang-format version > >> though or if changes happen in the > >> future. > > > > It's fine to set values. All I'm saying is that at least I would prefer > > if it was also clear what exact effect the setting of a value has, > > especially when that does not really match the language we use in the > > project. On C, allegedly, none. It ought to control defaults for things like SpaceBeforeCpp11BracedList, SpacesInAngles and other C++-specific things, because the C++ language sticks syntactical extensions every other Tuesday. Alas, whatever it does (there's no full list). I'd feel a lot more comfortable knowing it won't change under our feet. For reference, clang-format's docs state as an example: ``` c++03: latest: vector<set<int> > x; vs. vector<set<int>> x; ``` > > Yes I agree, I think Alejandro’s reply to this configurable reflects my > thoughts about it. > > So if we all agree that we should set this parameter, do we all agree that it > should be the > value above? > > Do you have other concerns regarding this or the other parameters in this > thread? > > Cheers, Alejandro
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |