File: build-dict.sh

package info (click to toggle)
dpdk 25.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 127,892 kB
  • sloc: ansic: 2,358,479; python: 16,426; sh: 4,474; makefile: 1,713; awk: 70
file content (29 lines) | stat: -rwxr-xr-x 750 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /bin/sh -e
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2020 Mellanox Technologies, Ltd

# Build a spelling dictionary suitable for DPDK_CHECKPATCH_CODESPELL

# path to local clone of https://github.com/codespell-project/codespell.git
codespell_path=$1
dic_path=$codespell_path/codespell_lib/data
if [ ! -d "$dic_path" ]; then
	echo "Usage: $0 <path_to_codespell_project>" >&2
	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
	cat $dic_path/dictionary$suffix
done |

# remove too short or wrong checks
sed '/^..->/d' |
sed '/^uint->/d' |
sed "/^doesn'->/d" |
sed '/^wasn->/d' |
sed '/^stdio->/d' |
sed '/^soring->/d' |

# print to stdout
cat