[PATCH] devtools: fix false positive from checkpatch
Bruce Richardson
bruce.richardson at intel.com
Tue Sep 17 17:45:35 CEST 2024
On Tue, Sep 17, 2024 at 08:34:21AM -0700, Stephen Hemminger wrote:
> The codespell dictionary has "stdio" in its bad word list,
> but stdio.h is often used in DPDK code and creates bogus false
> postitives from checkpatch.
>
> Also add a check to the parameters to build-dict.sh so it
> gives usage error if parameter is missing or does not point
> to the codespell git clone.
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
> devtools/build-dict.sh | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/devtools/build-dict.sh b/devtools/build-dict.sh
> index a8cac49029..96786d2c53 100755
> --- a/devtools/build-dict.sh
> +++ b/devtools/build-dict.sh
> @@ -6,6 +6,10 @@
>
> # path to local clone of https://github.com/codespell-project/codespell.git
> codespell_path=$1
> +if [ ! -d "$codespell_path/codespell_lib/data" ]; then
> + echo "Usage: $0 <path_to_codespell_project>"
> + exit 1
> +fi
>
> # concatenate codespell dictionaries, except GB/US one
> for suffix in .txt _code.txt _informal.txt _names.txt _rare.txt _usage.txt ; do
> @@ -17,6 +21,7 @@ sed '/^..->/d' |
> sed '/^uint->/d' |
> sed "/^doesn'->/d" |
> sed '/^wasn->/d' |
> +sed '/stdio->/d' |
>
Seems a good idea. However, why use "stdio" alone rather than using the
full "stdio.h" header name. Do we expect "stdio" to be used much in
comments or otherwise?
/Bruce
More information about the dev
mailing list