Skip to content
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

Analyzer binary dependent environment #4305

Merged
merged 3 commits into from
Aug 14, 2024
Merged

Conversation

dkrupp
Copy link
Member

@dkrupp dkrupp commented Jul 31, 2024

If a pre-package analyzer binary (e.g. clang) is found first, the LD_LIBRARY_PATH must be extended. On the other hand, if the analyzer binary is taken from the users machine, the original environment must be used to execute the binary.

This patch introduces an analyzer binary dependent environment initialization.

@dkrupp dkrupp requested review from bruntib and vodorok as code owners July 31, 2024 14:55
@dkrupp dkrupp added this to the release 6.24.1 milestone Jul 31, 2024
@dkrupp dkrupp force-pushed the env_fix branch 2 times, most recently from fa85919 to 43be7f0 Compare August 2, 2024 12:26
If a pre-package analyzer binary (e.g. clang) is found first,
the LD_LIBRARY_PATH must be extended. On the other hand, if the
analyzer binary is taken from the users machine, the original
environment must be used to execute the binary.

This patch introduces an analyzer binary dependent environment
initialization.
Copy link
Contributor

@bruntib bruntib left a comment

Choose a reason for hiding this comment

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

SourceAnalyzer class has a virtual function: analyze(). This sets the environment accordingly. The inherited Gcc and Cppcheck classes override this function which also set the environment. I think, we shouldn't expect the child classes do this job. The analyze() functions in these two inherited classes could be removed.

dkrupp and others added 2 commits August 14, 2024 11:10
Co-authored-by: bruntib <bruntib@users.noreply.github.com>
@dkrupp
Copy link
Member Author

dkrupp commented Aug 14, 2024

SourceAnalyzer class has a virtual function: analyze(). This sets the environment accordingly. The inherited Gcc and Cppcheck classes override this function which also set the environment. I think, we shouldn't expect the child classes do this job. The analyze() functions in these two inherited classes could be removed.

Good point! Fixed!

@dkrupp dkrupp requested a review from bruntib August 14, 2024 09:51
@bruntib bruntib merged commit d405186 into Ericsson:master Aug 14, 2024
8 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.

2 participants