mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-21 02:04:17 +00:00
contrib: fix "nm-python-black-format.sh" script to ignore systemd,c-util,nettools files
Otherwise, the path "src/c-stdaux/src/docs/conf.py" matches for formatting. But this file is imported via git-subtree, we don't want to format it. Filter out such paths.
This commit is contained in:
parent
42a70ce1d9
commit
30d89a121d
|
@ -75,6 +75,16 @@ FILES=()
|
|||
FILES+=( $(git ls-tree --name-only -r HEAD | grep '\.py$') )
|
||||
FILES+=( $(git grep -l '#!.*\<p[y]thon3\?\>') )
|
||||
FILES=( $(printf "%s\n" "${FILES[@]}" | sort -u) )
|
||||
|
||||
# Filter out paths that are forked from upstream projects and not
|
||||
# ours to reformat.
|
||||
FILES=( $(
|
||||
printf "%s\n" "${FILES[@]}" |
|
||||
sed \
|
||||
-e '/^src\/[cn]-[^/]\+\//d' \
|
||||
-e '/^src\/libnm-systemd-[^/]\+\/src\//d'
|
||||
) )
|
||||
|
||||
IFS="$OLD_IFS"
|
||||
|
||||
if [ $SHOW_FILENAMES = 1 ]; then
|
||||
|
|
Loading…
Reference in a new issue