Commit graph

6 commits

Author SHA1 Message Date
Fabio Baltieri 9d3681c10c scripts: compliance: add support for YAMLLint
Add a YAMLLint compliance check that uses the yamllint package to report
linting error on YAML files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-01-04 17:29:23 +01:00
Carles Cufi 1951071f14 requirements: Add lxml as a requirement
junitparser has a bug that prevents it from working correctly when lxml
is not installed.

See this GH issue for more information:
https://github.com/weiwei/junitparser/issues/99

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-11-13 06:25:59 -05:00
Henri Xavier b187477fe7 scripts: Upgrade to junitparser v2+
There is a breaking change in Junitparser 'TestCase.result' between
v1.x and v2.x.

Update check_compliance.py minimally to take into account this change.

This avoids relying on an outdated package.

Signed-off-by: Henri Xavier <datacomos@huawei.com>
2022-08-03 14:04:36 -04:00
Carles Cufi f9739ab41d python: Fix the requirement for libmagic to be installed
The Python python-magic module that we install for compliance checks
requires libmagic to be installed on the system to work. This requires
extra OS packages on Ubuntu and macOS, and an extra wheel on Windows.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-06-30 13:34:26 +02:00
Marc Herbert 6d36386e13 requirements-compliance: restrict junitparser version < 2
junitparser version 2 is incompatible with check_compliance.py, it fails
like this:

File "./scripts/ci/check_compliance.py", line 295, in parse_kconfig
   self.skip("Not a Zephyr tree (ZEPHYR_BASE unset)")
File "./scripts/ci/check_compliance.py", line 141, in skip
   self.case.result = Skipped(msg, "skipped")
File "/usr/local/lib/python3.9/site-packages/junitparser/junitparser.py"
   line 682, in result
   for entry in value:

TypeError: 'Skipped' object is not iterable

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2021-01-13 07:58:37 -05:00
Peter Bigot 78f36fa534 python3: add check_compliance package requirements
Running check_compliance on a PR before submitting it can avert
embarrassing mistakes.  Ensure the packages needed to do so are
installed along with all the others.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-11 14:49:48 -04:00