Construct signatures based on named declaration instead of just the identifier#2785
Merged
arturbosch merged 1 commit intomasterfrom Jun 10, 2020
Merged
Construct signatures based on named declaration instead of just the identifier#2785arturbosch merged 1 commit intomasterfrom
arturbosch merged 1 commit intomasterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2785 +/- ##
=========================================
Coverage 80.53% 80.53%
Complexity 2321 2321
=========================================
Files 386 386
Lines 6952 6952
Branches 1260 1260
=========================================
Hits 5599 5599
Misses 725 725
Partials 628 628
Continue to review full report at Codecov.
|
schalkms
approved these changes
Jun 10, 2020
BraisGabin
approved these changes
Jun 10, 2020
Member
Should we add this to #2680? |
Member
Author
Thanks for the reminder! I wrote the long text in this PR to also copy half of it to that ticket :). |
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 fixes a regression introduced in #2702 for baseline files.
See the updated baseline file for an example.
Further it corrects a regression we introduced in PRs like #2061 where we changed the code to report at the identifier:
in some complexity rules.
A signature should always include the whole function or class header to be unambiguous.
The signature algorithm is in fact wrong as it does not consider the whole signature of the parents of the reported elements.
See example from the testcase:
This signature includes the whole function header but not the package or extended types of
C.The right signature would be:
In 99.5% of all cases this will be no problem for our users but we should consider fixing this in a major release.
Conclusions: