-
Notifications
You must be signed in to change notification settings - Fork 1.5k
updated CI to latest ubuntu and clang #4004
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
Conversation
7e11996 to
e351afd
Compare
|
We need to merge #4036 first. |
…are not interested in
…as false positives and the results are inconsistent
|
@danmar This is now ready for review. |
Makefile
Outdated
| HAVE_RULES=no | ||
| endif | ||
|
|
||
| # Find available Python interpreter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm.. I can envision this could cause problems for somebody who builds cppcheck using mingw and doesn't have python.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's possible. I wasn't sure if there a case where no Python would be available at all. Not having Python would not be very useful though since you cannot use the matchcompiler or run all tests.
I will try if the detection can be put in a target which is run conditionally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not able to get it to work inside a target without duplicating the code. For the inline detection I used a shorter form though.
I also added some TODOs for potential issues I came across during testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok 👍
…ssion in clang-14
danmar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python
|
|
||
| checkCWEEntries: /tmp/errorlist.xml | ||
| ./tools/listErrorsWithoutCWE.py -F /tmp/errorlist.xml | ||
| $(eval PYTHON_INTERPRETER := $(if $(PYTHON_INTERPRETER),$(PYTHON_INTERPRETER),$(shell which python3))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a very strong opinion but I think we can require python3 for this script. It's not something a normal user will run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As outlined in #3596 I think we can completely drop Python 2.7. We also already switched to the distro versions of Python so the CI coverage also exists. But that is also outlined in the other PR.
Also after this is merged we can hopefully merge #3596 as well and we default to Python 3.x everywhere.
I would give it a release cycle to sink in, adding deprecation warnings to the build at the start of the next dev cycle (2.9) and drop it in the one afterward (2.10).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but I wonder what the motivation is to set PYTHON_INTERPRETER here. isn't it enough to use the shebang as we used to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can specify the interpreter when running make:
PYTHON_INTERPRETER=/usr/local/bin/python3.11 make
So this is done for consistency. It will mainly be necessary for testing and MinGW on Windows if the interpreter is not in the PATH.
Before this change it was done once globally but only with MATCHCOMPILER=yes. Since that might not be set and we don't want to do it unconditionally I had to replicate this since I was not able to do it in conditional code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, until now those that used checkCweEntries was satisfied with the shebang path. It's a script that is used very rarelly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also fails on platforms like Ubuntu 22.04 where python not longer exists by default and the shebang is not changed yet. The other way around it would fail if no Python 3 is installed by default like CentOS after the shebang is changed. So this is a required change to make the CI work.
No description provided.