2023-06-29 10:08:52

by Diederik de Haas

[permalink] [raw]
Subject: checkpatch: diff: LICENSES/null: No such file or directory

Hi,

The checkpatch.pl scripts has been a great help in improving the (very bad)
quality of some code I'm helping with, so thanks for that :-)

But it looks like I found a bug after I added a LICENSES dir and a
GPL-2.0-only license using the `reuse` tool. When I run this command:
~/dev/kernel.org/linux/scripts/checkpatch.pl --no-tree --file --terse *

in my working tree, I get "diff: LICENSES/null: No such file or directory"
after which it stops processing the rest of the files.

To reproduce:
1) git clone https://git.sr.ht/~diederik/bes2600 -b improve-code-formatting
2) cd bes2600
3) ~/dev/kernel.org/linux/scripts/checkpatch.pl --no-tree --file --terse *

If you then do `git reset HEAD~2 --hard` and run `checkpatch.pl` again, it'll
finish to completion.

I just did a similar test inside the kernel tree, and got a similar error:
- `scripts/checkpatch.pl --file --terse *`
- result: `diff: arch/null: No such file or directory`

As my LICENSES dir was my first subdirectory, it appears the issue is with
subdirectories in general?

Cheers,
Diederik


Attachments:
signature.asc (235.00 B)
This is a digitally signed message part.