mavsec.general.ProjectCheckResult
- class mavsec.general.ProjectCheckResult(project_errors: list[str] = <factory>, project_warnings: list[str] = <factory>, security_errors: list[str] = <factory>, security_warnings: list[str] = <factory>, design_errors: list[str] = <factory>, design_warnings: list[str] = <factory>)
Bases:
objectClass to represent the information when a project is checked.
- __init__(project_errors: list[str] = <factory>, project_warnings: list[str] = <factory>, security_errors: list[str] = <factory>, security_warnings: list[str] = <factory>, design_errors: list[str] = <factory>, design_warnings: list[str] = <factory>) None
Methods
__init__([project_errors, project_warnings, ...])design_error(msg)Add an error to the design errors list.
design_warning(msg)Add a warning to the design warnings list.
Check if there are any errors.
Check if there are any warnings.
merge(other)Merge two ProjectCheckResult objects.
merge_into(other)Merge two ProjectCheckResult objects into this object.
project_error(msg)Add an error to the project errors list.
project_warning(msg)Add a warning to the project warnings list.
security_error(msg)Add an error to the security errors list.
security_warning(msg)Add a warning to the security warnings list.
to_dict()Convert the object to a dictionary.
Attributes
Errors found in the project setup.
Warnings found in the project setup.
Errors found during the security handoff check.
Warnings found during the security handoff check.
Errors found during the design handoff check.
Warnings found during the design handoff check.
- design_error(msg: str) None
Add an error to the design errors list.
- Parameters:
msg (str) – The error message.
- design_errors: list[str]
Errors found during the design handoff check.
- design_warning(msg: str) None
Add a warning to the design warnings list.
- Parameters:
msg (str) – The warning message.
- design_warnings: list[str]
Warnings found during the design handoff check.
- has_errors() bool
Check if there are any errors.
- Returns:
True if there are errors, False otherwise.
- Return type:
bool
- has_warnings() bool
Check if there are any warnings.
- Returns:
True if there are warnings or errors, False otherwise.
- Return type:
bool
- merge(other: ProjectCheckResult) ProjectCheckResult
Merge two ProjectCheckResult objects.
- Parameters:
other (ProjectCheckResult) – The other object to merge.
- Returns:
The merged object.
- Return type:
- merge_into(other: ProjectCheckResult) None
Merge two ProjectCheckResult objects into this object.
- Parameters:
other (ProjectCheckResult) – The other object to merge.
- project_error(msg: str) None
Add an error to the project errors list.
- Parameters:
msg (str) – The error message.
- project_errors: list[str]
Errors found in the project setup.
- project_warning(msg: str) None
Add a warning to the project warnings list. :param msg: The warning message. :type msg: str
- project_warnings: list[str]
Warnings found in the project setup.
- security_error(msg: str) None
Add an error to the security errors list.
- Parameters:
msg (str) – The error message.
- security_errors: list[str]
Errors found during the security handoff check.
- security_warning(msg: str) None
Add a warning to the security warnings list.
- Parameters:
msg (str) – The warning message.
- security_warnings: list[str]
Warnings found during the security handoff check.
- to_dict() dict[str, list[str]]
Convert the object to a dictionary.
- Returns:
The dictionary.
- Return type:
dict