public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Schier <nicolas@fjasle.eu>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: [PATCH v3 2/2] kbuild: make W=1 warn files that are tracked but ignored by git
Date: Thu, 29 Dec 2022 15:23:17 +0100	[thread overview]
Message-ID: <Y62i1bwkYfhg2PSl@fjasle.eu> (raw)
In-Reply-To: <20221229074310.906556-2-masahiroy@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2500 bytes --]

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 <masahiroy@kernel.org>
> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
> ---
> 
> 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 <nicolas@fjasle.eu>

out of curiosity: do you plan to implement more checks in the misc-checks
target?

Kind regards,
Nicolas


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-12-29 14:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-29  7:43 [PATCH v3 1/2] .gitignore: update the command to check tracked files being ignored Masahiro Yamada
2022-12-29  7:43 ` [PATCH v3 2/2] kbuild: make W=1 warn files that are tracked but ignored by git Masahiro Yamada
2022-12-29 14:23   ` Nicolas Schier [this message]
2022-12-30  3:10     ` Masahiro Yamada
2023-01-27 13:25   ` Andy Shevchenko
2023-01-27 14:31     ` Masahiro Yamada
2023-01-27 14:41       ` Andy Shevchenko
2023-01-27 14:50         ` Andy Shevchenko
2023-01-27 14:52           ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y62i1bwkYfhg2PSl@fjasle.eu \
    --to=nicolas@fjasle.eu \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox