Skip to content

FunctionMatcher support for fully qualified function names - #5812

Merged
BraisGabin merged 4 commits into
detekt:mainfrom
lexa-diky:5767-FullyQualifiedFunctionSuppressor
Feb 26, 2023
Merged

FunctionMatcher support for fully qualified function names#5812
BraisGabin merged 4 commits into
detekt:mainfrom
lexa-diky:5767-FullyQualifiedFunctionSuppressor

Conversation

@lexa-diky

@lexa-diky lexa-diky commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

Now matcher will check both simple name e.g. foo and fully qualified one e.g. com.github.detekt.FooBar.foo.

Fixes #5767

@codecov

codecov Bot commented Feb 22, 2023

Copy link
Copy Markdown

Codecov Report

Merging #5812 (3c89c03) into main (5d45cba) will increase coverage by 0.07%.
The diff coverage is 66.66%.

@@             Coverage Diff              @@
##               main    #5812      +/-   ##
============================================
+ Coverage     84.48%   84.56%   +0.07%     
- Complexity     3743     3785      +42     
============================================
  Files           546      546              
  Lines         12788    12936     +148     
  Branches       2230     2275      +45     
============================================
+ Hits          10804    10939     +135     
+ Misses          869      863       -6     
- Partials       1115     1134      +19     
Impacted Files Coverage Δ
...in/io/github/detekt/tooling/api/FunctionMatcher.kt 86.30% <66.66%> (-1.20%) ⬇️
.../github/detekt/test/utils/KotlinScriptException.kt 0.00% <0.00%> (-100.00%) ⬇️
.../detekt/rules/naming/ConstructorParameterNaming.kt 88.57% <0.00%> (-5.88%) ⬇️
...io/gitlab/arturbosch/detekt/core/rules/RuleSets.kt 89.65% <0.00%> (-3.45%) ⬇️
...turbosch/detekt/rules/style/UnusedPrivateMember.kt 88.99% <0.00%> (-3.24%) ⬇️
...ls/src/main/kotlin/io/github/detekt/psi/KtFiles.kt 74.35% <0.00%> (-2.57%) ⬇️
...sch/detekt/rules/coroutines/SleepInsteadOfDelay.kt 74.00% <0.00%> (-1.87%) ⬇️
...io/gitlab/arturbosch/detekt/core/KtTreeCompiler.kt 77.41% <0.00%> (-1.37%) ⬇️
...gitlab/arturbosch/detekt/core/config/YamlConfig.kt 87.87% <0.00%> (-1.02%) ⬇️
...ules/documentation/LicenceHeaderLoaderExtension.kt 81.39% <0.00%> (-0.83%) ⬇️
... and 42 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@BraisGabin

Copy link
Copy Markdown
Member

This looks good! You didn't relate this with the issue because right now it doesn't fix that issue, right?

@lexa-diky

Copy link
Copy Markdown
Contributor Author

This looks good! You didn't relate this with the issue because right now it doesn't fix that issue, right?

I want to go through tests one more time, I have a suspension that they dont check behavior correctly

@lexa-diky
lexa-diky marked this pull request as ready for review February 24, 2023 08:23
@lexa-diky

Copy link
Copy Markdown
Contributor Author

This looks good! You didn't relate this with the issue because right now it doesn't fix that issue, right?

I want to go through tests one more time, I have a suspension that they dont check behavior correctly

Now it should be correct.

Previously most tests assumed that function is in the root package. So if we remove name check inside matcher tests would still pass. Not a case anymore

@BraisGabin

Copy link
Copy Markdown
Member

Fixes #5767

@BraisGabin BraisGabin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one :) Thanks!

@BraisGabin BraisGabin added this to the 1.23.0 milestone Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Function suppressor does not work as stated in docs

3 participants