From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web10.15050.1591194435305916622 for ; Wed, 03 Jun 2020 07:27:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ATfLJtAc; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591194434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o5PeR1XZT3EX5mdXNlrw8FqO3pLCmEzQ6I1oeXcGBEw=; b=ATfLJtAcJN3IdZFJ5RaU/jttiPCDlFE6BJG6oLneRPGZiQ6MH8xkHTPtaWd8GPPiDZA0s+ +2ShqMmZeKA37xW62KrUBUAmvJuvSG5/k16fqp35Qh6b0hgsfmX8ubpD4xyakTOgfsBHct MnXkT0dZzz6COMx2C3Z8AvY4r8oilWQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-218-rdn6z7Z3MU22dKaKfzfDHQ-1; Wed, 03 Jun 2020 10:27:06 -0400 X-MC-Unique: rdn6z7Z3MU22dKaKfzfDHQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D5A9187305F; Wed, 3 Jun 2020 14:27:04 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-115-50.ams2.redhat.com [10.36.115.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5943F891CB; Wed, 3 Jun 2020 14:27:03 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 0/5] Add a pipline to check Ecc issues for edk2 on open ci To: devel@edk2.groups.io, shenglei.zhang@intel.com Cc: Bob Feng , Bret Barkelew , Michael D Kinney , Liming Gao , Sean Brogan References: <20200603084807.24484-1-shenglei.zhang@intel.com> From: "Laszlo Ersek" Message-ID: Date: Wed, 3 Jun 2020 16:27:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200603084807.24484-1-shenglei.zhang@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 06/03/20 10:48, Zhang, Shenglei wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2606 > As planed we will enable Ecc check for edk2 on open ci. And they are > ready now, but these are V2 series. So I expect that contributors in > edk2 community can try using this script when reviewing. And I appreciate > receiving feedback and comments if someone find errors or false positive > issues. > > I created a pipline of EccCheck for my forked edk2. > https://dev.azure.com/shengleizhang/shengleizhang/_build?definitionId=10&_a=summary > > The patch series are big, so the commits are also pushed into my forked tree. > https://github.com/shenglei10/edk2/commits/ECC > > Patches > 1/5: This is a patch to enable python 3.8 for Ecc. It is a tool issues not > a pipline or script issue. But it is listed here for people willing > to try this tool. > 2/5: EccCheck.py is a tool to report Ecc issues for commits. It can be run > on azure servers for open ci, or locally. Its usage is like > PatchCheck.py. > 3/5: It's a lib necessary for py3 to run Ecc on azure servers. For local > use, we need to type command > "py -3 -m pip install antlr4-python3-runtime" first. > 4/5: Windows-EccCheck.yml is a yaml file to configure the newly added > pipline. The azure uses this to create a pipline. > 5/5: We consider some cases that will report out Ecc issues but they won't > be fixed, like submodule and industry standard related things. So we > add two configuration fields "Exception" and "IgnoreFiles" for people > to use. The patch is a example and the contents in the fields will be > empty in final version. > > Cc: Bob Feng > Cc: Bret Barkelew > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Sean Brogan > > v2: Update 2/5, fix the bug that the script can't hanlde multiple commits. Thanks for the ExceptionList / IgnoreFiles features; I think they are really important. I've run ECC in the past, and in some cases it is *way* too strict and opinionated, so I'm sure we'll end up "training" the ExceptionList entry for OvmfPkg. Can you please explain how (if?) ECC is restricted to new code added by a patch series? Patch#2 seems related, but I don't fully understand. It says, "It can only handle the issues, whose line number in CSV report accurately map with their code in source code files." Does that mean that CI performs a full ECC check, but filters out all warning / error messages that do not refer to code lines added in the patch series? Thanks, Laszlo