From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web11.11719.1575562368640495609 for ; Thu, 05 Dec 2019 08:12:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YD3iakQS; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575562367; 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; bh=c+qcAMSKN9Xzt05V1dXhyoh5aDkQdUvqFqLObafzQGY=; b=YD3iakQS9ZO27ZwvFbiQKkyfeWFj8jSFGQfZgebXYFpR+QenTzK6XelVGeOqf4AYkqmdhY EDkY8TXLKkYXoyB3bOGi7wBTAlpwHx1RlOWtTKyV65a0qgndu7ynVveMbG2q8ZMsnoyv2m H9dK+E2NL8Xne//bPwOjwYaWuFU/PKc= 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-135-l5VHFHFKNj6Q7K3Q9k1i6Q-1; Thu, 05 Dec 2019 11:12:42 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 00697DBC1; Thu, 5 Dec 2019 16:12:41 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-76.brq.redhat.com [10.40.205.76]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6D9E710013D9; Thu, 5 Dec 2019 16:12:36 +0000 (UTC) From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= To: devel@edk2.groups.io Cc: Philippe Mathieu-Daude , Bob Feng , Liming Gao , Laszlo Ersek , Ard Biesheuvel , Leif Lindholm Subject: [PATCH 0/6] BaseTools: Improve PatchCheck and add GitPostCommitHook Date: Thu, 5 Dec 2019 17:12:28 +0100 Message-Id: <20191205161234.25071-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: l5VHFHFKNj6Q7K3Q9k1i6Q-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, This series add a script that can be use as git-post-commit hook to run CheckPatch after each commit. I avoided shell scripts and use Python, so it should be usable by Visual Studio, but as I don't use it, I haven't tested there. However it is helpful for my use case, from a Linux console, because I won't forget to use CheckPatch again. In Patch #3 (GitPostCommitHook) I commented a problem with adding CRLF scripts on Unix, we can not run them directly. Patch #1 is actually a minor bug fix. Regards, Phil. Cc: Bob Feng Cc: Liming Gao Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Leif Lindholm Philippe Mathieu-Daude (6): BaseTools/PatchCheck: Stop parsing commit message after --- separator BaseTools/PatchCheck: Add a --quiet option BaseTools/Scripts: Add GitPostCommitHook.py BaseTools/PatchCheck: Extract the run_git() function BaseTools/PatchCheck: Add printw() function to print warnings BaseTools/PatchCheck: Allow to print colored warnings BaseTools/Scripts/GitPostCommitHook.py | 21 ++++++++ BaseTools/Scripts/PatchCheck.py | 70 ++++++++++++++++++-------- 2 files changed, 70 insertions(+), 21 deletions(-) create mode 100755 BaseTools/Scripts/GitPostCommitHook.py --=20 2.21.0