Debian Codegraph @

scripts/dnf_pylint

raw symbols SCIP
1 #!/usr/bin/bash
2
3 TEMP=`getopt -o s -n dnf_pylint -- "$@"`
4
5 [[ $? -eq 0 ]] || exit 1;
6 eval set -- "$TEMP"
7
8 TEMPLATE=--msg-template='{msg_id}: {module}:{line:3d},{column}: {msg}'
9 while true ; do
10 case "$1" in
11 -s) TEMPLATE=--msg-template='{msg_id}: {module}: {msg}'; shift ;;
12 --) shift ; break ;;
13 esac
14 done
15
16 THIS_DIR=$(readlink -f $(dirname $0))
17 FALSE_POSITIVES=$THIS_DIR/pylint_false_positives
18 DISABLED=""
19
20 function disable()
21 {
22 DISABLED="$DISABLED $1"
23 }
24
25 disable "-d C0111" # docstrings
26 disable "-d I0011" # locally disabled warnings
27 disable "-d R0801" # similar lines
28 disable "-d R0904" # too many public methods
29 disable "-d R0911" # too many return statements
30 disable "-d R0912" # too many branches
31 disable "-d R0913" # too many arguments
32 disable "-d R0903" # too few public methods
33 disable "-d W0141" # used builtin 'map' function
34 disable "-d W0142" # used star magic
35 disable "-d W0212" # access to a protected member
36
37 VAR_NAMES='--variable-rgx=[a-z_][a-z0-9_]*$'
38 DUMMY_NAMES='--dummy-variables-rgx=_.*'
39 MISC=--max-line-length=82
40
41 pylint --rcfile=/dev/null --reports=n $DISABLED "$VAR_NAMES" "$DUMMY_NAMES" $MISC $* \
42 "$TEMPLATE" \
43 | egrep -v -f $FALSE_POSITIVES