Skip to content

Conversation

@fabiobaltieri
Copy link
Member

@fabiobaltieri fabiobaltieri commented Aug 15, 2023

Add a compliance check to ensure all modules have a matching maintainer entry, add the two missing ones (added in #42580 and #56347)

@kristofer-jonsson-arm @najumon1980

keith-zephyr
keith-zephyr previously approved these changes Aug 15, 2023
MaureenHelm
MaureenHelm previously approved these changes Aug 15, 2023
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why recreate the manifest every time around the loop? This looks suspicious.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it's looping on two potential file names so it should only run once, but sure fair enough, reworked to code so it's not in a loop anymore.

Copy link
Contributor

@mbolivar-ampere mbolivar-ampere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I admit I'm confused about what this is trying to do.

The MODULES_FILE variable is confusing me. That doesn't have to be the name of the main manifest file. west.yml is a convention; it's not enforced.

So then when you load the manifest using Manifest.from_file(), it could be opening a completely different file -- as determined by the manifest.path and manifest.file variables in the local workspace. There is no enforced connection with any west.yml file.

@fabiobaltieri
Copy link
Member Author

So then when you load the manifest using Manifest.from_file(), it could be opening a completely different file -- as determined by the manifest.path and manifest.file variables in the local workspace. There is no enforced connection with any west.yml file.

My best interpretation of this is something like: "get the file name from manifest.path after loading it and use that for the check instead of the hardcoded one".

Cool, done!

@fabiobaltieri
Copy link
Member Author

@mbolivar-ampere ping

nashif
nashif previously approved these changes Aug 23, 2023
Copy link
Member

@nashif nashif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, does the job:

gale:zephyr(compliance-modules): ./scripts/ci/check_compliance.py
Running ModulesMaintainers tests in /home/nashif/zephyrproject/zephyr ...
Running KconfigBasicNoModules tests in /home/nashif/zephyrproject/zephyr ...
Running Kconfig          tests in /home/nashif/zephyrproject/zephyr ...
Running MaintainersFormat tests in /home/nashif/zephyrproject/zephyr ...
Running ImageSize        tests in /home/nashif/zephyrproject/zephyr ...
Running BinaryFiles      tests in /home/nashif/zephyrproject/zephyr ...
Running Identity         tests in /home/nashif/zephyrproject/zephyr ...
Running Pylint           tests in /home/nashif/zephyrproject/zephyr ...
Running DevicetreeBindings tests in /home/nashif/zephyrproject/zephyr ...
Running Gitlint          tests in /home/nashif/zephyrproject/zephyr ...
Running YAMLLint         tests in /home/nashif/zephyrproject/zephyr ...
Running Checkpatch       tests in /home/nashif/zephyrproject/zephyr ...
Running Nits             tests in /home/nashif/zephyrproject/zephyr ...
Running GitDiffCheck     tests in /home/nashif/zephyrproject/zephyr ...
Running KconfigBasic     tests in /home/nashif/zephyrproject/zephyr ...
2 checks failed
ERROR   : Test ModulesMaintainers failed:
Missing MAINTAINERS.yml entry for: "West project: lz5"
ERROR   : Test Gitlint failed:
1: T8 Title is too short (2<5): "xx"
1: UC3 Commit title does not follow [subsystem]: [subject] (and should not start with literal subsys:): "xx"
1: UC6 Commit message body is empty, should at least have 1 line(s).

Complete results in compliance.xml

@nashif nashif requested a review from mbolivar-ampere August 23, 2023 10:09
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it look like the check could be run in any repository, not just the zephyr repository, but that doesn't quite make sense with what's going on below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it? Not sure it would make much sense as it is now but I certainly wouldn't prevent it, may need some extra check, guess it can be added if someone comes up with a use case for it.

keith-zephyr
keith-zephyr previously approved these changes Aug 29, 2023
@mbolivar-ampere
Copy link
Contributor

@MaureenHelm please revisit

Add a check to ensure that every module has a corresponding maintainers
file entry, ensure modules are not added with no recorded point of
contact.

Signed-off-by: Fabio Baltieri <[email protected]>
@fabiobaltieri
Copy link
Member Author

Rebased - had the first patch merged separately and the rebase wasn't skipping it correctly for some reason. Main patch is unchanged.

@mbolivar-ampere mbolivar-ampere merged commit 183b84d into zephyrproject-rtos:main Sep 14, 2023
@fabiobaltieri fabiobaltieri deleted the compliance-modules branch September 14, 2023 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants