From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Cc: David Gow <davidgow@google.com>,
Brendan Higgins <brendan.higgins@linux.dev>,
Miguel Ojeda <ojeda@kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>,
linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust: doctests: Use tabs for indentation in generated C code
Date: Fri, 21 Jul 2023 18:10:35 +0200 [thread overview]
Message-ID: <CANiq72m-nd6vgH9XROMTC_Xf8__e26uPceFALu-_fAhnPnDYBg@mail.gmail.com> (raw)
In-Reply-To: <d3aa8c48-9f47-cead-aaa7-3ea796b91810@gmail.com>
On Fri, Jul 21, 2023 at 2:27 AM Martin Rodriguez Reboredo
<yakoyoku@gmail.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
prev parent reply other threads:[~2023-07-21 16:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 6:29 [PATCH] rust: doctests: Use tabs for indentation in generated C code David Gow
2023-07-20 9:55 ` Miguel Ojeda
2023-07-21 0:27 ` Martin Rodriguez Reboredo
2023-07-21 16:10 ` Miguel Ojeda [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANiq72m-nd6vgH9XROMTC_Xf8__e26uPceFALu-_fAhnPnDYBg@mail.gmail.com \
--to=miguel.ojeda.sandonis@gmail.com \
--cc=brendan.higgins@linux.dev \
--cc=davidgow@google.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=yakoyoku@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).