Reviewed-by: Liming Gao <gaolim...@byosoft.com.cn> > -----邮件原件----- > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Rebecca Cran > 发送时间: 2023年11月3日 22:42 > 收件人: Liming Gao <gaolim...@byosoft.com.cn> > 抄送: devel@edk2.groups.io; Bob Feng <bob.c.f...@intel.com>; Yuwei Chen > <yuwei.c...@intel.com> > 主题: Re: [edk2-devel] [PATCH 1/1] BaseTools: Update PatchCheck.py to > allow whitespace issues in .rtf files > > Liming, could you review this please? It's blocking another patch from > being committed. > > -- > Rebecca > > On 11/1/2023 6:20 PM, 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 <rebe...@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 > > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110691): https://edk2.groups.io/g/devel/message/110691 Mute This Topic: https://groups.io/mt/102412114/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-