File: test_python_style.sh

package info (click to toggle)
jss 5.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,204 kB
  • sloc: java: 73,154; ansic: 24,874; cpp: 4,414; sh: 873; xml: 402; python: 345; makefile: 28
file content (29 lines) | stat: -rwxr-xr-x 539 bytes parent folder | download | duplicates (4)
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
set -e

#
# Usage:
# test_python_style.sh [path]
#
# Tests the style of Python scripts in the build tree for compliance with pylint
# guidance. Runs:
#
#     pylint <file>
#
# On all checked files. If [path] is specified, assumed to be the root of the
# jss repository. Otherwise, defaults to `pwd`.
#

root_source_dir="$1"
if [ "x$root_source_dir" = "x" ]; then
    root_source_dir="$(pwd)"
fi

python_check() {
    target_file="$1"

    pylint "$root_source_dir/$target_file"
}


python_check "tools/build_pkcs11_constants.py"