Fix copy-paste-error#5444
Merged
danmar merged 1 commit intoSep 13, 2023
Merged
Conversation
Collaborator
|
hmm.. if Your change looks reasonable to me. It seems reasonable to use valuetok instead of vartok there. |
Collaborator
|
Thanks for your contribution! I am not sure if I see a good heuristic we can have to spot this also. If somebody can think of a good heuristic it would be great to create a Trac issue and describe the heuristic. A good heuristic should ideally not generate false positives for real code. |
Collaborator
|
I added your name in our AUTHORS file: 11e5c11 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in 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 is a warning we found during static analyis with CodeSecure CodeSonar.
It flagged a suspicious copy-paste error, where it finds code that seems to have been copied from another location, with some, but not all, variables substituted.
Unclear to me if this truly is a problem, or intentional, but I wanted to provide the feedback as I am not sure how to test this.
Lines 5614 to 5619 in lib/symboldatabase.cpp are a copy from 5597-5602 with vartok replaced by valuetok, except for line 5616