]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools Script: Formalize source files to follow DOS format
authorLiming Gao <liming.gao@intel.com>
Fri, 8 Jun 2018 09:03:47 +0000 (17:03 +0800)
committerLiming Gao <liming.gao@intel.com>
Wed, 13 Jun 2018 05:03:16 +0000 (13:03 +0800)
commitc30084fbac289b731d0bd102b0e91072c63ea029
treef3fa5468f010f6410d65e68fcfa6f4083de666a8
parent0f4387e5c87f80fe285cab324eaaa5bf60c656e8
BaseTools Script: Formalize source files to follow DOS format

V3:
support exclude dir and file by name while traversing the directory.
remove close in with statement.

V2:
add version,description,copyright.
add flag -v,-q,--append-extensions,--override-extensions,--debug.
-q will omit default output,-v and --debug are not implemented.
add default file extensions.
support input of file path.
support muliple input path.
simplify comment.
change 'pattern'.encode() to b'pattern',I think this will be better.
change naming of variable and function to keep the same with BinToPcd.py

V1:
FormatDosFiles.py is added to clean up dos source files. It bases on
the rules defined in EDKII C Coding Standards Specification.
5.1.2 Do not use tab characters
5.1.6 Only use CRLF (Carriage Return Line Feed) line endings.
5.1.7 All files must end with CRLF
No trailing white space in one line. (To be added in spec)

The source files in edk2 project with the below postfix are dos format.
.h .c .nasm .nasmb .asm .S .inf .dec .dsc .fdf .uni .asl .aslc .vfr .idf
.txt .bat .py

The package maintainer can use this script to clean up all files in his
package. The prefer way is to create one patch per one package.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Signed-off-by: Dongao Guo <dongao.guo@intel.com>
BaseTools/Scripts/FormatDosFiles.py [new file with mode: 0644]