TianoCore Community Design Meeting Minutes - Feb 5, 2021

Ni, Ray

Topic: TianoCore ECC (EFI Code Checker) Utility (Kinney Michael / Intel)
Slides: https://edk2.groups.io/g/devel/files/Designs/2021/0205/TianoCore%20ECC%20Utility.pdf

1. Purpose

Need help from community on ECC since it's deployed in CI process.
Several ECC tool issues occurred in CI process.
Call for volunteers to be the owners and testers of ECC.

* Owner(s)
* Maintainers (BaseTools)
M: Bob Feng <bob.c.feng@intel.com>
M: Liming Gao <gaoliming@byosoft.com.cn>
* Reviewers (BaseTools)
R: Yuwei Chen <yuwei.chen@intel.com>
* Testers
2. Open Discussions

a. Is it a right tool?
@Mike: Laszlo commented in steward meeting that it's a right tool doing EDKII specific checks.
@Nate: Have you evaluated the clang-format tool?
@Ray: I did some evaluation several months ago. ECC does some checks that clang-format doesn't. E.g.:
1. Only allow CRLF as line ending.
2. Check if no trailing white space in end of line.
3. Check if the predicate expression follows spec.
4. Check if file header and function header follow Doxygen style.
5. Check if the function format and macro format follow the spec.
6. Check if variable and function name follow the spec.
7. Other rules that check non-source files such as inf, dec, dsc, fdf files.
@Sean: Kubacki Michael is working on using uncrustify for coding style checking.
@Nate/@Ray: Prefer to use clang-format because it's widely used by increasingly open source projects.
@Sean: Clang-format was one of the candidates but the uncrustify was chosen in the end. Need Kubacki to provide more details.
@Sean: Better to use standard format tool as a checker and ECC can do EDKII specific checks that may not require ANTLR.
@Sean: Kubacki Michael is working on using uncrustify for coding style checking.

b. Is ECC too strict?
No comments from the meeting.

c. Configurability
No comments from the meeting.

3. Major Issues: refer to slides page #3

a. ECC CI plugin destroys modified but not checked in files.
@Liming: Agree it's a bug. But it doesn't impact CI running in server.
@Mike: can you submit a Bugzilla and propose a proper way to fix?
@Liming: I will.

b. ECC crashes due to mismatched antler versions
@Mike: Is it possible to update ECC to be compatible to old/new ANTLR versions?
@Bob: prefer to use the fixed version of antler for easy maintenance.
@Mike: Provide meaningful error message when version mismatches.

4. Open Bugs: refer to slides page #4
@Ray: Bug3131 (supporting leading asterisk) might violate the edk2 coding standard. Bug 3209 (allow lack of function headers) might increase the chance that implementation doesn't follow the interface defined in header file.

5. ECC Overview: refer to page #5~#13