Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6742992rwl; Thu, 29 Dec 2022 19:47:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXsPC4VYjM6tNi0YxDtgFpoI62STJ9TndTUct9oYd5iHnAnLK+MDgnSR20X3guHLaYeHVJMr X-Received: by 2002:a05:6402:1249:b0:48a:84da:538a with SMTP id l9-20020a056402124900b0048a84da538amr2017939edw.34.1672372059793; Thu, 29 Dec 2022 19:47:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672372059; cv=none; d=google.com; s=arc-20160816; b=l+IDcm7Vrk4NlpzCDGGNyxBTL3fydUgsig+TrLdVtgowytBNlctXGLV1185jLMFMM1 q6XFxGhV0HEKtQRlkVBOeUcpK/ZmHNzjDKiTWtBrFvI5wAn02XF//wlBRfDdRZc52WxO Xk6OW8WkINSdWyBExuK1Npbwb/x07UZ9ya2vUVz4+4Bkqrn2w/E2zDo146UhzQUlHL5Z a9bLXL36cu8+/ssuB2fnLaVOpQrH8ZEsBeizYzsYjakKM5qo2LL8iEm2DenyBWyr0dHn kEytKz2s0UGRopFDcrJoE9NtuBrCjf1IfUf0XPtwtXABl7hnUSW9p6+QiYnvLW6NTd4x /yrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=edZ9gHnsXwtflB4Xm2fLMJuIuiM21/LDbxXQ5W5LH4Q=; b=ncJLV0i9yKVGj7wOGAKRj57MI6PgjVIvDe8bw012xR1UkX5/02KGmV+wDYl6mXPAUx nc7X55bWAykpVZT7vnL/SAk9yyzuXU8Di5wkI/QKO8i7B5wfTHcq4dD10PjAsDIQWHh7 R3S5+qyIuk7yiyVQm2WIA13YSiyV1Ejwg4JyKTg+jLfa3ds/dFZyCv1iv3cLR9Tr5psh 9rz80HiYAm/C35KPqpEe7LBZpIXPfwgEodX78MPz//oYXtzNeAJ6j1UyA1uk+lK5hROz g5JMw71zO7AEFTUNlxaw81LSfZ3XKi6nT0Kzok5OwUICVW4pZwpu0YdwC6SO4Ep06EqE Q/pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ovJ4J3lG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds1-20020a0564021cc100b00483bfe99e45si12611473edb.268.2022.12.29.19.47.24; Thu, 29 Dec 2022 19:47:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ovJ4J3lG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234412AbiL3DLt (ORCPT + 64 others); Thu, 29 Dec 2022 22:11:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbiL3DLr (ORCPT ); Thu, 29 Dec 2022 22:11:47 -0500 Received: from conssluserg-03.nifty.com (conssluserg-03.nifty.com [210.131.2.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F4EE13D48; Thu, 29 Dec 2022 19:11:46 -0800 (PST) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (authenticated) by conssluserg-03.nifty.com with ESMTP id 2BU3BIee020234; Fri, 30 Dec 2022 12:11:19 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 2BU3BIee020234 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1672369879; bh=edZ9gHnsXwtflB4Xm2fLMJuIuiM21/LDbxXQ5W5LH4Q=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ovJ4J3lGTiasN1FAgiqSylCu1kk/d6pLUJytUBdO+7AzC98PknEHiBCprtws25ZjX w5pkOGUJsBCZwX/fBDwAGb5TTur6QCWu6oJBk/6izU4R6HjlRLm/WuTnJkyJpXwy4r joLi6yMwVu5Z5w6DasTnd3g7T70DRwzGTWMeqfspAPL8YpK5mI9a9hGg4UrddBTjTG i8EELLDgktUcmMNaShw2Ob2mwCtTL2egv0gohqA+3fF3q36O/vAqTQ72HyqetZSLXL wHNbe/iPfkIVKjBRt5Jumecj1kWFzZjWm6LkwFGnZJaMD8dYA3wqgaunh3FtnFOKby AfGbQlsE7Cy3A== X-Nifty-SrcIP: [209.85.210.44] Received: by mail-ot1-f44.google.com with SMTP id m6-20020a9d7e86000000b0066ec505ae93so12487094otp.9; Thu, 29 Dec 2022 19:11:19 -0800 (PST) X-Gm-Message-State: AFqh2koI0265YuTzkS2tCr/ljYpSJRdKKa5wVJSV/x6uiXBKjnGCL7Bd ts1fg/n/LU5m5fzbOLBwJc1PwDB72G7XwhqaS8I= X-Received: by 2002:a9d:7e99:0:b0:670:64b2:ae66 with SMTP id m25-20020a9d7e99000000b0067064b2ae66mr1951907otp.225.1672369878134; Thu, 29 Dec 2022 19:11:18 -0800 (PST) MIME-Version: 1.0 References: <20221229074310.906556-1-masahiroy@kernel.org> <20221229074310.906556-2-masahiroy@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Fri, 30 Dec 2022 12:10:41 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 2/2] kbuild: make W=1 warn files that are tracked but ignored by git To: Nicolas Schier Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor , Nick Desaulniers Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 29, 2022 at 11:23 PM Nicolas Schier wrote: > > On Thu, Dec 29, 2022 at 04:43:10PM +0900 Masahiro Yamada wrote: > > The top .gitignore comments about how to detect files breaking > > .gitignore rules, but people rarely care about it. > > > > Add a new W=1 warning to detect files that are tracked but ignored by > > git. If git is not installed or the source tree is not tracked by git > > at all, this script does not print anything. > > > > Running it on v6.2-rc1 detected the following: > > > > $ make W=1 misc-check > > Documentation/devicetree/bindings/.yamllint: warning: ignored by one of the .gitignore files > > drivers/clk/.kunitconfig: warning: ignored by one of the .gitignore files > > drivers/gpu/drm/tests/.kunitconfig: warning: ignored by one of the .gitignore files > > drivers/hid/.kunitconfig: warning: ignored by one of the .gitignore files > > fs/ext4/.kunitconfig: warning: ignored by one of the .gitignore files > > fs/fat/.kunitconfig: warning: ignored by one of the .gitignore files > > kernel/kcsan/.kunitconfig: warning: ignored by one of the .gitignore files > > lib/kunit/.kunitconfig: warning: ignored by one of the .gitignore files > > mm/kfence/.kunitconfig: warning: ignored by one of the .gitignore files > > tools/testing/selftests/arm64/tags/.gitignore: warning: ignored by one of the .gitignore files > > tools/testing/selftests/arm64/tags/Makefile: warning: ignored by one of the .gitignore files > > tools/testing/selftests/arm64/tags/run_tags_test.sh: warning: ignored by one of the .gitignore files > > tools/testing/selftests/arm64/tags/tags_test.c: warning: ignored by one of the .gitignore files > > > > These are ignored by the '.*' or 'tags' in the top .gitignore, but > > there is no rule to negate it. > > > > You might be tempted to do 'git add -f' but I want to have the real > > issue fixed (by fixing a .gitignore, or by renaming files, etc.). > > > > Signed-off-by: Masahiro Yamada > > Reviewed-by: Nathan Chancellor > > Reviewed-by: Nicolas Schier > > --- > > > > Changes in v3: > > - change working directory to srctree (Nicolas) > > > > Changes in v2: > > - Add $(srctree)/ to make it work with O= > > > > Makefile | 6 ++++++ > > scripts/misc-check | 19 +++++++++++++++++++ > > 2 files changed, 25 insertions(+) > > create mode 100755 scripts/misc-check > > Tested-by: Nicolas Schier > > out of curiosity: do you plan to implement more checks in the misc-checks > target? I chose a generic name so I can put more in this script, but honestly I have nothing else in my mind for now. > > Kind regards, > Nicolas > -- Best Regards Masahiro Yamada