Skip to content

Commit b9ace00

Browse files
authored
VED-855: Low/Info priority Sonar maintainability issues (#1251)
1 parent 7b7b039 commit b9ace00

7 files changed

Lines changed: 6 additions & 8 deletions

File tree

lambdas/ack_backend/src/update_ack_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def create_ack_data(
123123
"Success" if successful_api_response else "Business Level Response Value - Processing Error"
124124
),
125125
"RECEIVED_TIME": created_at_formatted_string,
126-
"MAILBOX_FROM": "", # TODO: Leave blank for DPS, use mailbox name if picked up from MESH mail box
126+
"MAILBOX_FROM": "", # VED-197 TODO: Leave blank for DPS, use mailbox name if picked up from MESH mail box
127127
"LOCAL_ID": local_id,
128128
"IMMS_ID": imms_id or "",
129129
"OPERATION_OUTCOME": diagnostics or "",

lambdas/mns_subscription/src/mns_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def get_mns_service(mns_env: str = "int"):
1414
boto_config = Config(region_name="eu-west-2")
1515
cache = Cache(directory="/tmp")
1616
logging.info("Creating authenticator...")
17-
# TODO: MNS and PDS need separate secrets
17+
# VED-1087 TODO: MNS and PDS need separate secrets
1818
authenticator = AppRestrictedAuth(
1919
service=Service.PDS,
2020
secret_manager_client=boto3.client("secretsmanager", config=boto_config),

lambdas/shared/src/common/ack_file_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def make_ack_data(
2828
"RESPONSE_CODE": ("20013" if (validation_passed and message_delivered) else "10002"),
2929
"RESPONSE_DISPLAY": (success_display if (validation_passed and message_delivered) else failure_display),
3030
"RECEIVED_TIME": created_at_formatted_string,
31-
"MAILBOX_FROM": "", # TODO: Leave blank for DPS, add mailbox if from mesh mailbox
32-
"LOCAL_ID": "", # TODO: Leave blank for DPS, add from ctl file if data picked up from MESH mailbox
31+
"MAILBOX_FROM": "", # VED-197 TODO: Leave blank for DPS, add mailbox if from mesh mailbox
32+
"LOCAL_ID": "", # VED-197 TODO: Leave blank for DPS, add from ctl file if data picked up from MESH mailbox
3333
"MESSAGE_DELIVERY": message_delivered,
3434
}
3535

lambdas/shared/src/common/log_decorator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""This module contains the logging decorator for sending the appropriate logs to Cloudwatch and Firehose.
22
The decorator log pattern is shared by filenameprocessor, recordprocessor, ack_backend and id_sync modules.
33
and therefore could be moved to a common module in the future.
4-
TODO: Duplication check has been suppressed in sonar-project.properties. Remove once refactored.
54
"""
65

76
import json

lambdas/shared/src/common/models/fhir_immunization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def run_post_validators(immunization: dict, vaccine_type: str) -> None:
3333
if error := PostValidators(immunization, vaccine_type).validate():
3434
raise ValueError(error)
3535

36-
# TODO: Update this function as reduce_validation_code is no longer found in the payload after data minimisation
36+
# VED-1086 TODO: Update this function as reduce_validation_code is no longer found in the payload after data minimisation
3737
@staticmethod
3838
def is_reduce_validation():
3939
"""Identify if reduced validation applies (default to false if no reduce validation information is given)"""

lambdas/shared/src/common/models/field_locations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class FieldLocations:
2525
target_disease = "protocolApplied[0].targetDisease"
2626
target_disease_codes = f"protocolApplied[0].targetDisease[0].coding[?(@.system=='{Urls.SNOMED}')].code"
2727
patient_identifier_value = (
28-
"contained[?(@.resourceType=='Patient')].identifier[0].value" # TODO: Fix to use nhs number url lookup
28+
"contained[?(@.resourceType=='Patient')].identifier[0].value" # VED-1088 TODO: Fix to use nhs number url lookup
2929
)
3030
patient_name_given: str = field(init=False)
3131
patient_name_family: str = field(init=False)

sonar-project.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ sonar.organization=nhsdigital
44
sonar.host.url=https://sonarcloud.io
55
sonar.python.version=3.11
66
sonar.exclusions=**/proxies/**,**/utilities/scripts/**,**/infrastructure/account/**,**/infrastructure/instance/**,**/terraform_aws_backup/**,**/tests/**
7-
sonar.coverage.exclusions=lambdas/shared/src/common/models/batch_constants.py
87
sonar.python.coverage.reportPaths=backend-coverage.xml,delta-coverage.xml,ack-lambda-coverage.xml,filenameprocessor-coverage.xml,recordforwarder-coverage.xml,recordprocessor-coverage.xml,mesh_processor-coverage.xml,redis_sync-coverage.xml,mns_subscription-coverage.xml,id_sync-coverage.xml,shared-coverage.xml,batchprocessorfilter-coverage.xml
98
sonar.cpd.exclusions=**/Dockerfile
109
sonar.issue.ignore.multicriteria=exclude_http_urls,exclude_writable_dirs,exclude_force_dict

0 commit comments

Comments
 (0)