[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72m-nd6vgH9XROMTC_Xf8__e26uPceFALu-_fAhnPnDYBg@mail.gmail.com>
Date: Fri, 21 Jul 2023 18:10:35 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Martin Rodriguez Reboredo <yakoyoku@...il.com>
Cc: David Gow <davidgow@...gle.com>,
Brendan Higgins <brendan.higgins@...ux.dev>,
Miguel Ojeda <ojeda@...nel.org>,
Shuah Khan <skhan@...uxfoundation.org>,
linux-kselftest@...r.kernel.org, kunit-dev@...glegroups.com,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rust: doctests: Use tabs for indentation in generated C code
On Fri, Jul 21, 2023 at 2:27 AM Martin Rodriguez Reboredo
<yakoyoku@...il.com> wrote:
>
> I find it weird to mix indentations in one file, but if it leaves a
> good result then I'll hold my tongue.
In general I would agree, but I guess we can consider these as "data"
since they are part of a literal, and thus we could consider it is not
mixing indentations in that sense (for the Rust code).
It could potentially confuse a script or tool that does not know about
the language and make it report an inconsistency. But there is always
going to be a corner case or similar that you need to skip/ignore in a
tool like that. And, in other cases, like the analysis that was done
for the potential `.editorconfig` file, it would just be noise since
we don't do this kind of generation often within `.rs` files.
Either way is fine for me: I don't mind the status quo, because it is
just a generated file, so I don't expect many readers; and I don't
mind the file having the proper tabs for its file extension either,
and I guess perhaps having those tabs helps avoid some other tool
complaining about the file if it is run when the file exists.
Cheers,
Miguel
Powered by blists - more mailing lists