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: object

Class 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.

has_errors()

Check if there are any errors.

has_warnings()

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

project_errors

Errors found in the project setup.

project_warnings

Warnings found in the project setup.

security_errors

Errors found during the security handoff check.

security_warnings

Warnings found during the security handoff check.

design_errors

Errors found during the design handoff check.

design_warnings

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:

ProjectCheckResult

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