File: lint

package info (click to toggle)
dnf-plugins-core 4.10.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,752 kB
  • sloc: python: 7,441; sh: 23; makefile: 15; xml: 7
file content (29 lines) | stat: -rwxr-xr-x 852 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/bash

[[ $? -eq 0 ]] || exit 1;
TEMPLATE=--msg-template='{msg_id}: {module}:{line:3d},{column}: {msg}'
THIS_DIR=$(readlink -f $(dirname $0))
FALSE_POSITIVES=$THIS_DIR/pylint_false_positives
DISABLED=""

function disable()
{
    DISABLED="$DISABLED $1"
}

disable "-d C0111" # docstrings
disable "-d C0325" # parens with print
disable "-d R0904" # too many public methods
disable "-d R0911" # too many return statements
disable "-d R0912" # too many branches
disable "-d R0903" # too few public methods
disable "-d W0141" # used builtin 'map' function
disable "-d W0142" # used star magic

VAR_NAMES=--variable-rgx='[a-z_][a-z0-9_]*$'
DUMMY_NAMES='--dummy-variables-rgx=_.*'
MISC=--max-line-length=82

pylint --rcfile=/dev/null --reports=n $DISABLED "$VAR_NAMES" "$DUMMY_NAMES" $MISC $* \
    "$TEMPLATE" \
    | egrep -v -f $FALSE_POSITIVES