ClickHouse/utils/check-style/check-pylint

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
490 B
Plaintext
Raw Normal View History

2024-03-09 20:38:23 +00:00
#!/usr/bin/env bash
LC_ALL="en_US.UTF-8"
ROOT_PATH=$(git rev-parse --show-toplevel)
function xargs-pylint {
# $1 is number maximum arguments per pylint process
sort | awk '$2=="text/x-script.python" {print $1}' | \
xargs -P "$(nproc)" -n "$1" pylint --rcfile="$ROOT_PATH/pyproject.toml" --persistent=no --score=n
}
2024-06-15 16:25:49 +00:00
# exclude ci unittest scripts from check: test_*
find "$ROOT_PATH/tests" -maxdepth 2 -type f -exec file -F' ' --mime-type {} + | grep -v "/test_" | xargs-pylint 50
2024-07-19 08:27:15 +00:00