mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
notify-api-387 scan projects for unused code
This commit is contained in:
2
.github/workflows/checks.yml
vendored
2
.github/workflows/checks.yml
vendored
@@ -36,6 +36,8 @@ jobs:
|
|||||||
run: pipenv run flake8 .
|
run: pipenv run flake8 .
|
||||||
- name: Check imports alphabetized
|
- name: Check imports alphabetized
|
||||||
run: pipenv run isort --check-only ./app ./tests
|
run: pipenv run isort --check-only ./app ./tests
|
||||||
|
- name: Check dead code
|
||||||
|
run: make dead-code
|
||||||
- name: Run js lint
|
- name: Run js lint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
- name: Run js tests
|
- name: Run js tests
|
||||||
|
|||||||
3
Makefile
3
Makefile
@@ -59,9 +59,6 @@ py-test: ## Run python unit tests
|
|||||||
pipenv run coverage report --fail-under=96
|
pipenv run coverage report --fail-under=96
|
||||||
pipenv run coverage html -d .coverage_cache
|
pipenv run coverage html -d .coverage_cache
|
||||||
|
|
||||||
.PHONY: dead-code
|
|
||||||
dead-code:
|
|
||||||
pipenv run vulture ./app --min-confidence=100
|
|
||||||
|
|
||||||
.PHONY: e2e-test
|
.PHONY: e2e-test
|
||||||
e2e-test: export NEW_RELIC_ENVIRONMENT=test
|
e2e-test: export NEW_RELIC_ENVIRONMENT=test
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ def get_notifications_as_json(service_id, message_type=None):
|
|||||||
endpoint="view_notifications_csv"
|
endpoint="view_notifications_csv"
|
||||||
)
|
)
|
||||||
@user_has_permissions()
|
@user_has_permissions()
|
||||||
def get_notifications(service_id, message_type, status_override=None):
|
def get_notifications(service_id, message_type, status_override=None): # noqa
|
||||||
# TODO get the api to return count of pages as well.
|
# TODO get the api to return count of pages as well.
|
||||||
page = get_page_from_request()
|
page = get_page_from_request()
|
||||||
if page is None:
|
if page is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user