Do you confirm the EDK2 BaseTools coding style apply to BaseTools too?

 

It would mean C sources must have CRLF line endings.

 

What about Python source files? It looks there is no requirement on the line
endings in Python source files. The Python Coding style in EDK2:
https://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Code_Style/
Python refers to http://www.python.org/dev/peps/pep-0008/.
<http://www.python.org/dev/peps/pep-0008/>  But there is no reference to the
line endings.

 

On this page
'http://docs.python.org/3/tutorial/interpreter.html#executable-python-script
s',
<http://docs.python.org/3/tutorial/interpreter.html#executable-python-script
s%27,>  you can also read:

On BSD'ish Unix systems, Python scripts can be made directly executable,
like shell scripts (...) On some platforms, this first line must end with a
Unix-style line ending ('\n'), not a Windows ('\r\n') line ending.

 

But we do not directly call the Python BaseTools script from the shell. We
go through $EDK2_ROOT/BaseTools/BinWrappers/PosixLike/ scripts.

 

Some files in BaseTools have mixed line endings. Control Version Systems
complain about it. Example:

-          BaseTools\Source\C\GenFw\elf_common.h: mixed CR & CRLF

-          BaseTools\Source\Python\GenFds\Fv.py: mixed CR & CRLF

-          BaseTools\Source\Python\GenFds\GenFdsGlobalVariable.py: mixed CR
& CRLF

 

What is the recommended line endings for Python sources?

 

Thanks,

Olivier
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
edk2-buildtools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel

Reply via email to