File: lint

package info (click to toggle)
knot-resolver 6.0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,376 kB
  • sloc: javascript: 42,732; ansic: 40,311; python: 12,580; cpp: 2,121; sh: 1,988; xml: 193; makefile: 181
file content (26 lines) | stat: -rwxr-xr-x 566 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
23
24
25
26
#!/usr/bin/env bash

# ensure consistent behaviour
src_dir="$(dirname "$(realpath "$0")")"
source $src_dir/utils/_env.sh

# stop failing early, because we wouldn't do anything else than fail
set +e

# check code using ruff
echo -e "${yellow}Linting using ruff...${reset}"
ruff check python/knot_resolver tests/pytests
check_rv $?
echo

# check types using mypy
echo -e "${yellow}Checking types using mypy...${reset}"
mypy python/knot_resolver
check_rv $?
echo

# fancy messages at the end :)
fancy_message

# exit with the aggregate return value
exit $aggregated_rv