public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, rebecca@bsdio.com,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Bob Feng <bob.c.feng@intel.com>,
	Yuwei Chen <yuwei.chen@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Update PatchCheck.py to allow whitespace issues in .rtf files
Date: Thu, 2 Nov 2023 11:56:44 +0100	[thread overview]
Message-ID: <19653d30-e63a-573a-eb88-bbcf91558ca5@redhat.com> (raw)
In-Reply-To: <20231102002052.17494-1-rebecca@bsdio.com>

On 11/2/23 01:20, Rebecca Cran wrote:
> Allow .rtf files created by applications such as Notepad to be committed
> as-is without further manual editing by skipping the requirements for
> CRLF, no tabs and no trailing whitespace.
> 
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
>  BaseTools/Scripts/PatchCheck.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
> index 900226f18fe5..7f372d40b570 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -363,6 +363,9 @@ class GitDiffCheck:
>                  self.is_newfile = False
>                  self.force_crlf = True
>                  self.force_notabs = True
> +                if self.filename.endswith('.rtf'):
> +                    self.force_crlf = False
> +                    self.force_notabs = False
>                  if self.filename.endswith('.sh') or \
>                      self.filename.startswith('BaseTools/BinWrappers/PosixLike/') or \
>                      self.filename.startswith('BaseTools/BinPipWrappers/PosixLike/') or \
> @@ -416,7 +419,7 @@ class GitDiffCheck:
>                      self.format_error("didn't find diff hunk marker (@@)")
>              self.line_num += 1
>          elif self.state == PATCH:
> -            if self.binary:
> +            if self.binary or self.filename.endswith(".rtf"):
>                  pass
>              elif line.startswith('-'):
>                  pass

superficially
Acked-by: Laszlo Ersek <lersek@redhat.com>




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110521): https://edk2.groups.io/g/devel/message/110521
Mute This Topic: https://groups.io/mt/102332684/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-11-02 10:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02  0:20 [edk2-devel] [PATCH 1/1] BaseTools: Update PatchCheck.py to allow whitespace issues in .rtf files Rebecca Cran
2023-11-02 10:56 ` Laszlo Ersek [this message]
2023-11-03 14:41 ` Rebecca Cran
2023-11-06  1:04   ` 回复: " gaoliming via groups.io

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-list 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=19653d30-e63a-573a-eb88-bbcf91558ca5@redhat.com \
    --to=devel@edk2.groups.io \
    /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