[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKXUXMzzXKsXDHe8mZr53Af49=0wpz1-MJYhFNwKS5hvL7Zxyw@mail.gmail.com>
Date: Wed, 17 Aug 2022 13:20:40 +0200
From: Lukas Bulwahn <lukas.bulwahn@...il.com>
To: Matthias May <matthias.may@...termo.com>
Cc: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>,
Dwaipayan Ray <dwaipayanray1@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
bpf <bpf@...r.kernel.org>
Subject: Re: False-positive in Checkpatch
On Wed, Aug 17, 2022 at 10:29 AM Matthias May <matthias.may@...termo.com> wrote:
>
> Hi Checkpatch Maintainers
>
> The selftest patch at
> https://lore.kernel.org/netdev/20220817073649.26117-1-matthias.may@westermo.com/T/#u
> claims too long lines.
> However this seems to be a misinterpretation of the indention before the printf split over 2
> lines to exactly not have too long lines.
> The false positive checkpatch results are also on the netdev patchwork:
> https://patchwork.kernel.org/project/netdevbpf/patch/20220817073649.26117-1-matthias.may@westermo.com/
>
Hi Matthias,
Thanks for reporting. I tried checkpatch on this referred patch and
can confirm that it reports:
WARNING: line length of 132 exceeds 100 columns
#413: FILE: tools/testing/selftests/net/l2_tos_ttl_inherit.sh:359:
+printf "┌────────┬───────┬───────┬──────────────┬"
WARNING: line length of 107 exceeds 100 columns
#414: FILE: tools/testing/selftests/net/l2_tos_ttl_inherit.sh:360:
+printf "──────────────┬───────┬────────┐\n"
WARNING: line length of 148 exceeds 100 columns
#420: FILE: tools/testing/selftests/net/l2_tos_ttl_inherit.sh:366:
+ printf "├────────┼───────┼───────┼──────────────┼"
WARNING: line length of 123 exceeds 100 columns
#421: FILE: tools/testing/selftests/net/l2_tos_ttl_inherit.sh:367:
+ printf "──────────────┼───────┼────────┤\n"
WARNING: line length of 156 exceeds 100 columns
#425: FILE: tools/testing/selftests/net/l2_tos_ttl_inherit.sh:371:
+ printf "├────────┼───────┼───────┼──────────────┼"
WARNING: line length of 131 exceeds 100 columns
#426: FILE: tools/testing/selftests/net/l2_tos_ttl_inherit.sh:372:
+ printf "──────────────┼───────┼────────┤\n"
WARNING: line length of 132 exceeds 100 columns
#439: FILE: tools/testing/selftests/net/l2_tos_ttl_inherit.sh:385:
+printf "└────────┴───────┴───────┴──────────────┴"
WARNING: line length of 107 exceeds 100 columns
#440: FILE: tools/testing/selftests/net/l2_tos_ttl_inherit.sh:386:
+printf "──────────────┴───────┴────────┘\n"
In my editor (vim), these lines are rather short but it seems the real
line number is much larger.
For example, in line 420, vim states "420,135-66" at the end of the
line. So, there are clearly different ways of counting the number of
characters this line has. I think that at least explains it, I really
do not know which way of counting is the best, though.
Lukas
Powered by blists - more mailing lists