MagicNumber DslGradleRunner test fix#9245
Merged
schalkms merged 2 commits intoApr 14, 2026
Merged
Conversation
This was easy to miss with changing the default of `ignorePropertyDeclaration` from false to true, but some of these Gradle tests rely on expecting this `smellyConstant` to continue being a code smell which isn't the case anymore by default. Changed it to a method so that it should report when withFinding is true.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9245 +/- ##
=========================================
Coverage 84.84% 84.84%
Complexity 4429 4429
=========================================
Files 569 569
Lines 12299 12299
Branches 2707 2707
=========================================
Hits 10435 10435
Misses 688 688
Partials 1176 1176 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Changing it to a method caused other issues, so the easiest fix I can think of for now is converting back to a constant and setting `ignorePropertyDeclaration` to false since this is what these test cases expected. Updated those test cases to make sure it uses the configFileContent by passing a file name through `withConfigFile`.
Contributor
Author
|
This should also allow #9244 to pass if merged. |
schalkms
approved these changes
Apr 14, 2026
Collaborator
Member
|
I triggered a rebase including test runs for the linked PR. Thank you for the hint 😊 |
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 was easy to miss with changing the default of
ignorePropertyDeclarationfrom false to true, but some of these Gradle tests rely on expecting thissmellyConstantto continue being a code smell which isn't the case anymore by default.Changed it to a method so that it should report when withFinding is true.Edit: Changing it to a method caused other issues, so the easiest fix I can think of for now is converting back to a constant and setting
ignorePropertyDeclarationto false since this is what these test cases expected. Updated those test cases to make sure it uses the configFileContent by passing a file name throughwithConfigFile.