-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rename findSymbols
into lookupSymbolByName
#1772
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR renames `findSymbols` into `lookupSymbolByName` as a more appropriate name, because it lookups a symbol by its name. Fixes #1767
oxisto
force-pushed
the
1767-rename-findsymbols-to-lookupsymbolsbyname
branch
from
October 2, 2024 20:54
3d503eb
to
572f992
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
☔ View full report in Codecov by Sentry. |
KuechA
approved these changes
Oct 3, 2024
cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/ScopeManager.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: KuechA <31155350+KuechA@users.noreply.github.com>
maximiliankaul
pushed a commit
that referenced
this pull request
Oct 8, 2024
* Rename `findSymbols` into `lookupSymbolByName` This PR renames `findSymbols` into `lookupSymbolByName` as a more appropriate name, because it lookups a symbol by its name. Fixes #1767 * Update cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/ScopeManager.kt Co-authored-by: KuechA <31155350+KuechA@users.noreply.github.com> * Added documentation --------- Co-authored-by: KuechA <31155350+KuechA@users.noreply.github.com>
KuechA
added a commit
that referenced
this pull request
Oct 18, 2024
* new node for RaiseStatement + NodeBuilder code * don't add python stuff in this branch * started work on EOG and DFG * doc * raise: fluent and first test * fluent: patch @oxisto * Start work on DFG test for raise * rename raise -> throw * more renaming raise -> throw * copy & paste handleThrowOperator * Update cpg-core/src/test/kotlin/de/fraunhofer/aisec/cpg/graph/edges/flows/DataflowTest.kt Co-authored-by: KuechA <31155350+KuechA@users.noreply.github.com> * Rename `findSymbols` into `lookupSymbolByName` (#1772) * Rename `findSymbols` into `lookupSymbolByName` This PR renames `findSymbols` into `lookupSymbolByName` as a more appropriate name, because it lookups a symbol by its name. Fixes #1767 * Update cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/ScopeManager.kt Co-authored-by: KuechA <31155350+KuechA@users.noreply.github.com> * Added documentation --------- Co-authored-by: KuechA <31155350+KuechA@users.noreply.github.com> * Update dependency rollup to v4.24.0 (#1774) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Added language trait `HasImplicitReceiver` (#1778) Added language trait `HasImplicit Receiver` This is needed in preparation for #1777 to better handle access to fields/members of a class when an implicit receiver is used. * Cleanup of `SymbolResolver` (#1777) * Fixed crash in `getCodeOfSubregion` (#1776) * Add new function `lookupUniqueTypeSymbolByName` (#1781) * Add new function `lookupUniqueTypeSymbolByName` This adds two new functions `ScopeManager.lookupUniqueTypeSymbolByName` and `Reference.doesReferToType`. This harmonizes a lot of boilerplate code in type resolver, cxx extra pass and resolve ambuigity pass, which were all trying to achieve the same thing. Fixes #1766 * Fixed issue with Go test, more robust handling of wrapped references * Addressed code review * Make sure to move `typeObservers` from old to new node when replacing nodes (#1783) * Make sure to move `typeObservers` from old to new node when replacing nodes * Added doc for typeobservers * `implicit()` only triggers code/location update now if its not empty (#1784) Otherwise, we override the code/location again. * Added `:=` as simple operator in Python (#1785) Named expressions in Python use `:=` as operator. Therefore we need to include it in the language definition. Otherwise, the `access` value of a reference will not be set correctly. * code review * code review * code review * rename cause to parentException * doc * ThrowStatement: add toString * fix tests * Merge EOG, add tests * Documentation * More doc of EOG handling --------- Co-authored-by: KuechA <31155350+KuechA@users.noreply.github.com> Co-authored-by: Christian Banse <christian.banse@aisec.fraunhofer.de> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alexander Kuechler <alexander.kuechler@aisec.fraunhofer.de>
KuechA
added a commit
that referenced
this pull request
Oct 18, 2024
* new node for RaiseStatement + NodeBuilder code * don't add python stuff in this branch * started work on EOG and DFG * doc * raise: fluent and first test * fluent: patch @oxisto * Start work on DFG test for raise * rename raise -> throw * more renaming raise -> throw * python: raise * copy & paste handleThrowOperator * Update cpg-core/src/test/kotlin/de/fraunhofer/aisec/cpg/graph/edges/flows/DataflowTest.kt Co-authored-by: KuechA <31155350+KuechA@users.noreply.github.com> * Rename `findSymbols` into `lookupSymbolByName` (#1772) * Rename `findSymbols` into `lookupSymbolByName` This PR renames `findSymbols` into `lookupSymbolByName` as a more appropriate name, because it lookups a symbol by its name. Fixes #1767 * Update cpg-core/src/main/kotlin/de/fraunhofer/aisec/cpg/ScopeManager.kt Co-authored-by: KuechA <31155350+KuechA@users.noreply.github.com> * Added documentation --------- Co-authored-by: KuechA <31155350+KuechA@users.noreply.github.com> * Update dependency rollup to v4.24.0 (#1774) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Added language trait `HasImplicitReceiver` (#1778) Added language trait `HasImplicit Receiver` This is needed in preparation for #1777 to better handle access to fields/members of a class when an implicit receiver is used. * Cleanup of `SymbolResolver` (#1777) * Fixed crash in `getCodeOfSubregion` (#1776) * Add new function `lookupUniqueTypeSymbolByName` (#1781) * Add new function `lookupUniqueTypeSymbolByName` This adds two new functions `ScopeManager.lookupUniqueTypeSymbolByName` and `Reference.doesReferToType`. This harmonizes a lot of boilerplate code in type resolver, cxx extra pass and resolve ambuigity pass, which were all trying to achieve the same thing. Fixes #1766 * Fixed issue with Go test, more robust handling of wrapped references * Addressed code review * Make sure to move `typeObservers` from old to new node when replacing nodes (#1783) * Make sure to move `typeObservers` from old to new node when replacing nodes * Added doc for typeobservers * `implicit()` only triggers code/location update now if its not empty (#1784) Otherwise, we override the code/location again. * Added `:=` as simple operator in Python (#1785) Named expressions in Python use `:=` as operator. Therefore we need to include it in the language definition. Otherwise, the `access` value of a reference will not be set correctly. * code review * code review * code review * rename cause to parentException * doc * ThrowStatement: add toString * fix tests * Enable raising the exception in the with statement * Test * Test++ --------- Co-authored-by: KuechA <31155350+KuechA@users.noreply.github.com> Co-authored-by: Christian Banse <christian.banse@aisec.fraunhofer.de> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alexander Kuechler <alexander.kuechler@aisec.fraunhofer.de>
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR renames
findSymbols
intolookupSymbolByName
as a more appropriate name, because it lookups a symbol by its name.It also adds the appropriate documentation about symbol lookup.
Fixes #1767