Quality Assurance

During the process of including or changing the HRIM repository some checks are made, in order to propose your changes to HRIM you should take into account the following:

A XSD schema is available in the HRIM repository in order to validate the XML files.

To validate a XML schema you can use the following command:

xmllint --schema models/schemas/module.xsd models/composite/arm/arm.xml --noout --xinclude

The HRIM generator is writed in Python 3 and it is available in the HRIM github repository.

This python application should compliant with the PEP 8 standard, also other code inspector are used in order to ensure the code quality.

The HRIM code should comply with:

  • Python3
    • PEP 8 coding style
    • PEP 8 naming convention
    • Python Pylint
    • Python Bandit
  • XML/XSD
  • YAML
    • YAML Yamllint convention
  • Bash
    • ShellCheck
  • Dockerfile
    • Hadolint

Default rule-sets are used. Check the default rule-set of codefactor

Maximum characters per line is set as the PEP 8 standard, 79 characters per line.

The actual code quality of HRIM is:

CodeFactor

We develop a ROS 2 base package that runs every single interface and validates that the generated output is valid. The package is available here.

Note that if new platform are included, new test procedures should be determined in order to ensure the generated code quality.

When a PR is reached to the HRIM repository multiple checks will occur.

Travis will ensure that:

  • All the XML files are valid
  • HRIM tool works
  • All the HRIM messages can be build against the latest version of ROS 2.

Codefactor will check the quality of the code that is pushed.

Pending PR

In order to accept a pull request you should check:

  • No issues in CodeFactor
  • Travis CI build passed
  • At least one maintainer should review and accept the PR

All checks will be performed automatically. If a pull request have no successful checks the PR will no be accepted.