Skip to content

scripts: ci: Check compliance checkpatch module fixes #92327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

decsny
Copy link
Member

@decsny decsny commented Jun 27, 2025

Fixes #92324

@@ -323,6 +323,8 @@ def run(self):
if len(matches) == 0:
self.failure(output)

diff.communicate()
Copy link
Contributor

@kartben kartben Jun 27, 2025

Choose a reason for hiding this comment

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

I will let @pdgendt comment and confirm but I think the "Python way" would be to use a context manager

with subprocess.Popen(.. blah... ) as diff:
    try:
        ...

Copy link
Contributor

Choose a reason for hiding this comment

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

Preferably, yes

@@ -4,7 +4,7 @@
# zephyr-keep-sorted-start
clang-format>=15.0.0
gitlint
junitparser>=2
junitparser>=4.0.1
Copy link
Contributor

Choose a reason for hiding this comment

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

You should also update requirements-action.in and regenerate requirements-action.txt as right now it has 3.2.0 pinned (which I guess doesn't have the bug, which makes the update not strictly mandatory, perhaps)

decsny added 2 commits July 1, 2025 11:34
The git diff subprocess was leaking, ie.,
it was still running with it's file streams open,
and python was printing warnings about this. Fix by calling
communicate() on the object which will do the cleanup.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
junitparser had a bug causing a traceback when running the checkpatch
check compliance module, fix is in 4.0.1 of junitparser from this PR:
weiwei/junitparser#168

Update requirements to make sure we get this version.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
@decsny decsny force-pushed the check_compliance_fixes_6_27 branch from 7d5edb5 to f64476c Compare July 1, 2025 16:43
Copy link

sonarqubecloud bot commented Jul 1, 2025

@decsny
Copy link
Member Author

decsny commented Jul 1, 2025

the code scan check is failing due to something I am not actually adding on this PR, that I don't understand...

@dleach02 dleach02 requested review from pdgendt and kartben July 1, 2025 20:25
@decsny decsny changed the title Check compliance checkpatch module fixes scripts: ci: Check compliance checkpatch module fixes Jul 15, 2025
@nashif nashif merged commit 1f1a2e2 into zephyrproject-rtos:main Jul 19, 2025
28 checks passed
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.

scripts: ci: check_compliance fails in checkpatch case
7 participants