diff --git a/Makefile b/Makefile index 079c699c5..ae1734b43 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,16 @@ py-lint: ## Run python linting scanners pipenv run flake8 . pipenv run isort --check-only ./app ./tests +.PHONY: avg-complexity +avg-complexity: + echo "*** Shows average complexity in radon of all code ***" + pipenv run radon cc ./app -a -na + +.PHONY: too-complex +too-complex: + echo "*** Shows code that got a rating of D or F in radon ***" + pipenv run radon cc ./app -a -nd + .PHONY: py-test py-test: export NEW_RELIC_ENVIRONMENT=test py-test: ## Run python unit tests diff --git a/Pipfile b/Pipfile index 3924e2b50..821d45883 100644 --- a/Pipfile +++ b/Pipfile @@ -38,6 +38,7 @@ flask-talisman = "*" notifications-utils = {editable = true, ref = "main", git = "https://github.com/GSA/notifications-utils.git"} coverage = "*" pytest-playwright = "*" +radon = "==6.0.1" [dev-packages] isort = "==5.12.0"