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

Next enhancements for parsing and analysing OpenStack #2094

Closed
wants to merge 6 commits into from

Conversation

oxisto
Copy link
Member

@oxisto oxisto commented Mar 1, 2025

@oxisto oxisto added the publish-to-github-packages If added to a PR, builds from it will be published as a GitHub package label Mar 1, 2025
@oxisto oxisto force-pushed the openstack-sprint2 branch from 0581cd2 to 8710a87 Compare March 1, 2025 14:41
Copy link

codecov bot commented Mar 1, 2025

Codecov Report

Attention: Patch coverage is 73.04965% with 38 lines in your changes missing coverage. Please review.

Project coverage is 78.59%. Comparing base (31a0059) to head (478950f).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ec/cpg/passes/concepts/config/ProvideConfigPass.kt 66.03% 10 Missing and 8 partials ⚠️
...cepts/config/ini/IniFileConfigurationSourcePass.kt 60.00% 6 Missing and 4 partials ⚠️
...tlin/de/fraunhofer/aisec/cpg/TranslationManager.kt 60.86% 7 Missing and 2 partials ⚠️
...sec/cpg/frontends/python/PythonLanguageFrontend.kt 50.00% 0 Missing and 1 partial ⚠️

❌ Your patch status has failed because the patch coverage (73.04%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
Files with missing lines Coverage Δ
...r/aisec/cpg/graph/concepts/config/Configuration.kt 100.00% <100.00%> (ø)
...pts/config/python/PythonStdLibConfigurationPass.kt 63.76% <100.00%> (ø)
...tlin/de/fraunhofer/aisec/cpg/TranslationContext.kt 100.00% <100.00%> (ø)
...ain/kotlin/de/fraunhofer/aisec/cpg/helpers/Util.kt 60.63% <100.00%> (ø)
...fer/aisec/cpg/frontends/python/StatementHandler.kt 86.27% <100.00%> (+0.19%) ⬆️
...sec/cpg/frontends/python/PythonLanguageFrontend.kt 81.20% <50.00%> (-0.29%) ⬇️
...tlin/de/fraunhofer/aisec/cpg/TranslationManager.kt 78.09% <60.86%> (-0.35%) ⬇️
...cepts/config/ini/IniFileConfigurationSourcePass.kt 62.16% <60.00%> (ø)
...ec/cpg/passes/concepts/config/ProvideConfigPass.kt 66.03% <66.03%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oxisto oxisto force-pushed the openstack-sprint2 branch 5 times, most recently from bef5c7a to fde23f5 Compare March 2, 2025 22:19
@oxisto oxisto requested a review from fwendland as a code owner March 2, 2025 22:19
@oxisto oxisto force-pushed the openstack-sprint2 branch 2 times, most recently from 8b96496 to 80eac6b Compare March 3, 2025 08:59
oxisto and others added 6 commits March 3, 2025 11:02
It seems that the query tree now contains all the failed and good paths, but we can at least now differentiate between them
… of the whole config

This makes the API a little bit cleaner since we do not need to pass the conf object, which is already known and it attaches the operations to their respective counterparts, e.g. reading an option is an operation on an option now and not of the overall configuraton. It also introduces `allOps` as a way to get all the operations of the whole config again.
This PR fixes some issues with parsing of additional sources. The main problem was that if include parts are "sister" paths, e.g., ../external/lib1 and ../external/lib2, then the previous logic return an incorrect relativ path of ../lib2 instead of "lib2". This PR changes that and optimizes the implementation in a way that the additional sources are already prepared in a relative way in the translation manager (the original include path is kept to be sure). This way, a language frontend can just focus on looking at relative paths and see whether they match for example a package structure.
@oxisto oxisto force-pushed the openstack-sprint2 branch from 80eac6b to 478950f Compare March 3, 2025 10:02
@oxisto
Copy link
Member Author

oxisto commented Mar 3, 2025

All is merged.

@oxisto oxisto closed this Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
publish-to-github-packages If added to a PR, builds from it will be published as a GitHub package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant