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

OutdatedDocumentation - Detect param which private property documented as property #6372

Merged
merged 2 commits into from Aug 13, 2023

Conversation

atulgpt
Copy link
Contributor

@atulgpt atulgpt commented Aug 5, 2023

Fixes #6371

@codecov
Copy link

codecov bot commented Aug 5, 2023

Codecov Report

Merging #6372 (148a8b7) into main (67cd931) will increase coverage by 0.00%.
Report is 5 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main    #6372   +/-   ##
=========================================
  Coverage     85.16%   85.16%           
+ Complexity     4010     4009    -1     
=========================================
  Files           570      570           
  Lines         13401    13398    -3     
  Branches       2363     2361    -2     
=========================================
- Hits          11413    11411    -2     
- Misses          834      835    +1     
+ Partials       1154     1152    -2     
Files Changed Coverage Δ
...etekt/rules/documentation/OutdatedDocumentation.kt 91.30% <100.00%> (ø)

... and 7 files with indirect coverage changes

@@ -147,7 +148,7 @@ class OutdatedDocumentation(config: Config = Config.empty) : Rule(config) {
private fun getDeclarationsForValueParameters(valueParameters: List<KtParameter>): List<Declaration> {
return valueParameters.mapNotNull {
it.name?.let { name ->
val type = if (it.isPropertyParameter()) {
val type = if (it.isPropertyParameter() && it.isPublic) {
Copy link
Member

Choose a reason for hiding this comment

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

probably !private? because protected is also public API. internal is arguable, but there are still external users outside the component itself, so docs are recomended.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch.. updated the logic. Thanks

@atulgpt atulgpt force-pushed the fixes/6362/fix-property-param branch from cb1c3ab to 148a8b7 Compare August 6, 2023 15:30
@atulgpt atulgpt requested a review from TWiStErRob August 8, 2023 20:56
@cortinico cortinico changed the title Detect param which private property documented as property OutdatedDocumentation - Detect param which private property documented as property Aug 9, 2023
@BraisGabin BraisGabin added this to the 2.0.0 milestone Aug 13, 2023
@BraisGabin BraisGabin merged commit a5907b7 into detekt:main Aug 13, 2023
23 checks passed
@atulgpt atulgpt deleted the fixes/6362/fix-property-param branch August 13, 2023 11:42
@cortinico cortinico added the pick request Marker for PRs that should be ported to the 1.0 release branch label Aug 19, 2023
cortinico pushed a commit that referenced this pull request Oct 30, 2023
…d as property (#6372)

* Detect param which private property documented as property

* Use not of private instead of public
rvandermeulen added a commit to mozilla-mobile/firefox-android that referenced this pull request Nov 2, 2023
rvandermeulen added a commit to mozilla-mobile/firefox-android that referenced this pull request Nov 2, 2023
mergify bot pushed a commit to mozilla-mobile/firefox-android that referenced this pull request Nov 2, 2023
akliuxingyuan pushed a commit to fork-maintainers/iceraven-browser that referenced this pull request Dec 18, 2023
mgroth0 pushed a commit to mgroth0/detekt that referenced this pull request Feb 11, 2024
…d as property (detekt#6372)

* Detect param which private property documented as property

* Use not of private instead of public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pick request Marker for PRs that should be ported to the 1.0 release branch rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False negative on OutdatedDocumentation around private property
5 participants