Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUSTOM_GETTERS_SETTERS false positive when a property has a backing field #1815

Merged
merged 5 commits into from
Nov 27, 2023

Conversation

diphtongue
Copy link
Contributor

What's done:

  • fixed warning CUSTOM_GETTERS_SETTERS on properties with backing field.
  • added warning tests.

Closes #1709

### What's done:
* fix
@diphtongue diphtongue linked an issue Nov 22, 2023 that may be closed by this pull request
1 task
@diphtongue diphtongue requested a review from nulls November 22, 2023 12:45
Copy link
Contributor

github-actions bot commented Nov 22, 2023

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v2)

   164 files  ±0     164 suites  ±0   6m 33s ⏱️ -55s
1 399 tests +2  1 382 ✔️ +2  17 💤 ±0  0 ±0 
2 778 runs  +2  2 761 ✔️ +2  17 💤 ±0  0 ±0 

Results for commit d4d8fea. ± Comparison against base commit b5c1a37.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Nov 22, 2023

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v2)

   164 files  ±0     164 suites  ±0   9m 20s ⏱️ +20s
1 399 tests +2  1 363 ✔️ +2  36 💤 ±0  0 ±0 
2 778 runs  +2  2 742 ✔️ +2  36 💤 ±0  0 ±0 

Results for commit d4d8fea. ± Comparison against base commit b5c1a37.

♻️ This comment has been updated with latest results.

…ield.

- added `ASTNode.isPrivate()`, `ASTNode.hasSetterGetter()` methods
- added `isPairPropertyBackingField(propertyNode: ASTNode?, backingFieldNode: ASTNode?)` function
- added warning tests.

Closes #1709
Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (b5c1a37) 78.62% compared to head (d4d8fea) 78.64%.

Files Patch % Lines
...m/saveourtool/diktat/ruleset/utils/AstNodeUtils.kt 68.18% 1 Missing and 6 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1815      +/-   ##
============================================
+ Coverage     78.62%   78.64%   +0.02%     
+ Complexity     2441     2432       -9     
============================================
  Files           126      126              
  Lines          8555     8562       +7     
  Branches       2163     2171       +8     
============================================
+ Hits           6726     6734       +8     
- Misses          861      862       +1     
+ Partials        968      966       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@diphtongue diphtongue requested a review from DrAlexD November 24, 2023 10:02
@diphtongue diphtongue merged commit 2030a14 into master Nov 27, 2023
19 of 20 checks passed
@diphtongue diphtongue deleted the bugfix/custom-setter branch November 27, 2023 08:57
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.

CUSTOM_GETTERS_SETTERS false positive when a property has a backing field
4 participants