From aef5317af860dffa478fa5bbdff1387a20bf0a9c Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 7 Aug 2023 10:11:24 -0700 Subject: [PATCH] notify-api-386 scan projects for code complexity --- Makefile | 10 ++++++++++ Pipfile | 2 ++ 2 files changed, 12 insertions(+) diff --git a/Makefile b/Makefile index de400611b..861f86439 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,16 @@ bootstrap-with-docker: ## Build the image to run the app in Docker run-procfile: pipenv run honcho start -f Procfile.dev +.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: run-flask run-flask: ## Run flask pipenv run newrelic-admin run-program flask run -p 6011 --host=0.0.0.0 diff --git a/Pipfile b/Pipfile index 9f24d7a23..b38e7a7d7 100644 --- a/Pipfile +++ b/Pipfile @@ -52,6 +52,8 @@ notifications-python-client = "==6.3.0" oscrypto = "==1.3.0" psycopg2-binary = "==2.9.3" pyjwt = "==2.7.0" +pylint = "==2.17.5" +radon = "==6.0.1" python-dotenv = "==1.0.0" sqlalchemy = "==1.4.40" werkzeug = "~=2.3"