File: run-lint

package info (click to toggle)
cloud-init 25.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,412 kB
  • sloc: python: 135,894; sh: 3,883; makefile: 141; javascript: 30; xml: 22
file content (22 lines) | stat: -rwxr-xr-x 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

# This file runs flake8 for compatibility's sake. As soon as we move off python 3.6, this should be changed to use ruff.

CR="
"
pycheck_dirs=( "cloudinit/" "tests/" "tools/"  "setup.py" )

set -f
if [ $# -eq 0 ]; then
   files=( "${pycheck_dirs[@]}" )
else
   files=( "$@" )
fi

if [ -z "$PYTHON" ]; then
   PYTHON="python3"
fi
cmd=( "$PYTHON" -m "flake8" "${files[@]}" )

echo "Running: " "${cmd[@]}" 1>&2
exec "${cmd[@]}"