Skip to content

Commit 0f3eb35

Browse files
authored
Merge pull request #397 from vil02/add_xenon
chore: monitor code complexity with `xenon`
2 parents fa81566 + 3588c45 commit 0f3eb35

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

check_python_file.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ do
2121
printf "Checking with mypy:\n%s\n" "${mypy_output}"
2222
exit_code=1
2323
}
24+
25+
xenon_output=$(poetry run xenon --max-absolute B --max-modules A --max-average A "${cur_file}" 2>&1) || {
26+
printf "Checking \"%s\"\n" "${cur_file}"
27+
printf "Checking with xenon:\n%s\n" "${xenon_output}"
28+
exit_code=1
29+
}
2430
done
2531

2632
if [[ ${exit_code} -eq 0 ]] ; then

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ coverage = "7.6.10"
2626
black = "24.10.0"
2727
mypy = "1.14.1"
2828
bandit = "1.8.0"
29+
xenon = "0.9.3"
2930

3031
[build-system]
3132
requires = ["poetry-core"]

0 commit comments

Comments
 (0)