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

Python logging concept #2082

Merged
merged 31 commits into from
Feb 28, 2025
Merged

Python logging concept #2082

merged 31 commits into from
Feb 28, 2025

Conversation

maximiliankaul
Copy link
Contributor

Initial draft for Pythons import logging

@maximiliankaul maximiliankaul added python concepts Related to CPG concepts module labels Feb 26, 2025
@maximiliankaul maximiliankaul self-assigned this Feb 26, 2025
@maximiliankaul maximiliankaul linked an issue Feb 26, 2025 that may be closed by this pull request
oxisto and others added 4 commits February 27, 2025 11:59
…pace

In some some languages, we have an ambuigity when calling `a()` whether this is a local function or imported from another namespace. This pass harmornizes the name of `CallExpression` nodes when they are imported from another package.
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

Attention: Patch coverage is 90.99099% with 10 lines in your changes missing coverage. Please review.

Project coverage is 78.52%. Comparing base (1be0b5a) to head (c419bdf).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...oncepts/logging/python/PythonLoggingConceptPass.kt 86.84% 4 Missing and 6 partials ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...fraunhofer/aisec/cpg/graph/concepts/logging/Log.kt 100.00% <100.00%> (ø)
...unhofer/aisec/cpg/graph/concepts/logging/LogGet.kt 100.00% <100.00%> (ø)
...hofer/aisec/cpg/graph/concepts/logging/LogWrite.kt 100.00% <100.00%> (ø)
...aisec/cpg/graph/concepts/logging/LoggingBuilder.kt 100.00% <100.00%> (ø)
...oncepts/logging/python/PythonLoggingConceptPass.kt 86.84% <86.84%> (ø)

... and 1 file with indirect coverage changes

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

@maximiliankaul maximiliankaul marked this pull request as ready for review February 27, 2025 12:54
oxisto and others added 9 commits February 27, 2025 20:22
# Conflicts:
#	cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/passes/ResolveMemberExpressionAmbiguityPass.kt
* Added fallback for `translationUnitForInference`

It seems that sometimes `source.scope?.astNode?.component` is null and I added a fallback to definitly get a component.

* Better error messages
@maximiliankaul maximiliankaul added the publish-to-github-packages If added to a PR, builds from it will be published as a GitHub package label Feb 28, 2025
@maximiliankaul maximiliankaul enabled auto-merge (squash) February 28, 2025 13:32
@maximiliankaul maximiliankaul merged commit 74ac405 into main Feb 28, 2025
4 checks passed
@maximiliankaul maximiliankaul deleted the mk/conceptLogging branch February 28, 2025 13:35
oxisto added a commit that referenced this pull request Mar 1, 2025
Implement Python: `import logging` concept handling.

---------

Co-authored-by: Christian Banse <[email protected]>
Co-authored-by: KuechA <[email protected]>
oxisto added a commit that referenced this pull request Mar 1, 2025
Implement Python: `import logging` concept handling.

---------

Co-authored-by: Christian Banse <[email protected]>
Co-authored-by: KuechA <[email protected]>
oxisto added a commit that referenced this pull request Mar 1, 2025
Implement Python: `import logging` concept handling.

---------

Co-authored-by: Christian Banse <[email protected]>
Co-authored-by: KuechA <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concepts Related to CPG concepts module publish-to-github-packages If added to a PR, builds from it will be published as a GitHub package python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants