From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05F5172 for ; Wed, 8 Sep 2021 17:07:54 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 34BDB61139; Wed, 8 Sep 2021 17:07:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631120874; bh=80AvqZOv2RZcZbeG+YgdxOHOj1vveJJVoxh9nrQ9MFY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Mnwyjq5BW0zV7+7N3JPvf6PAUAeT/bhKnb04jCd4zUYdWPe3z6+bseg5+aFhz8Pp0 peGJih9WiWxGlRxxl//19cwYc21vHId1R+ckzCv2uTzH/xGcC3NQ7uMZ7dEpB7M9FK KU6gYmADQMF8/Hl0NkWzN5l1ohe4II+IJmgsV4R+He3AWPCH27UjjNf7fhAxxIS3LF 0owKopXTFG2f0NXAu6CmYAU5KYIaIl/io9CNrZrvnd2ZKKvQCEXLgIfulz3dAxyKLp aaKA7YXmtCZ2y1RG0z7mgCraIhk7kO5V8HjdMM6J5q20HD0T+aEoQb0Y65bj2/tZ2x fk24CIwOH7V+A== Date: Wed, 8 Sep 2021 10:07:48 -0700 From: Nathan Chancellor To: Kortan Cc: ndesaulniers@google.com, masahiroy@kernel.org, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] gen_compile_commands: fix missing 'sys' package Message-ID: References: <20210908032847.18683-1-kortanzh@gmail.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210908032847.18683-1-kortanzh@gmail.com> On Wed, Sep 08, 2021 at 11:28:48AM +0800, Kortan wrote: > We need to import the 'sys' package since the script has called > sys.exit() method. > > Signed-off-by: Kortan Thank you for making those changes! I should have mentioned that this probably warrants a Fixes: tag, which can be generated by running: $ git show -s --format='Fixes: %h ("%s")' 6ad7cbc01527223f3f92baac9b122f15651cf76b Fixes: 6ad7cbc01527 ("Makefile: Add clang-tidy and static analyzer support to makefile") as that was the patch that introduced this issue. I personally have a git alias for this as it comes up enough. $ git config --get alias.fixes show -s --format="Fixes: %h (\"%s\")" I do not think this warrants a v3, just something to keep in mind for the future. Fixes: 6ad7cbc01527 ("Makefile: Add clang-tidy and static analyzer support to makefile") Reviewed-by: Nathan Chancellor > --- > Changes v1 -> v2: > * Fix commit title. > * Improve commit message. > > scripts/clang-tools/gen_compile_commands.py | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py > index 0033eedce003..1d1bde1fd45e 100755 > --- a/scripts/clang-tools/gen_compile_commands.py > +++ b/scripts/clang-tools/gen_compile_commands.py > @@ -13,6 +13,7 @@ import logging > import os > import re > import subprocess > +import sys > > _DEFAULT_OUTPUT = 'compile_commands.json' > _DEFAULT_LOG_LEVEL = 'WARNING' > -- > 2.33.0 > >