-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Update Detekt Configuration] Fine-Tune Default Rules #16984
Conversation
Enabling this rule was discussed in the link shared below and thus this is a good opportunity to fine-tune Detekt to include it: Link: #14011 #issuecomment-775885924 Also, as part of enabling this rule, the only warning based on that was suppressed, that is, instead of being resolved since a resolution would require a proper solution (and testing).
Enabling this rule was discussed in the link shared below and thus this is a good opportunity to fine-tune Detekt to include it: Link: #14011 #issuecomment-775885924 Also, as part of enabling this rule, some warnings based on that were suppressed, that is, instead of being resolved since a resolution would require a proper solution (and testing), while some other warnings were properly resolved.
Enabling this rule was discussed in the link shared below and thus this is a good opportunity to fine-tune Detekt to include it: Link: #14011 #issuecomment-775885924
Enabling this rule was discussed in the link shared below and thus this is a good opportunity to fine-tune Detekt to include it: Link: #14011 #issuecomment-775885924 Also, as part of enabling this rule, the only warning based on that was resolved.
Disabling this configuration was discussed in the link shared below and thus this is a good opportunity to fine-tune Detekt to update it: Link: #14011 #issuecomment-775885924
Updating this rule was discussed in the link shared below and thus this is a good opportunity to fine-tune Detekt to update it: Link: #14011 #issuecomment-775885924 Also, as part of enabling this rule, some warnings based on that was suppressed (them being TODOs), that is, instead of being resolved since a resolution would require a proper solution (and testing). PS: This commit align WPAndroid with WCAndroid in terms of Detekt rules.
Updating this rule was discussed in the link shared below and thus this is a good opportunity to fine-tune Detekt to update it: Link: #14011 #issuecomment-775885924
Updating this rule to align WPAndroid with WCAndroid in terms of Detekt rules. As part of updating this rule you will notice that all such baseline rules got removed and either added explicitly, inline/close to source or just deleted since they are no longer necessary. Thus, you will notice some new suppress annotations that got added as part of this commit. But, all those warnings are being added because they got moved from the baseline and not because they are new.
Disabling this rule to align WPAndroid with WCAndroid in terms of Detekt rules. As part of disabling this rule you will notice that all such baseline rules got removed as well.
This was done because those warnings are line based and since these files got updated from previous commits they are now complaining again. Thus, removing them from the baseline and moving them explicitly, inline/close to source makes it so that this problem will never happen again for those specific cases.
This was done because those warnings are line based and since these files got updated from previous commits they are now complaining again. Thus, removing them from the baseline and moving them explicitly, inline/close to source makes it so that this problem will never happen again for those specific cases.
You can test the WordPress changes on this Pull Request by downloading an installable build (wordpress-installable-build-pr16984-2fa2522.apk), or scanning this QR code: |
You can test the Jetpack changes on this Pull Request by downloading an installable build (jetpack-installable-build-pr16984-2fa2522.apk), or scanning this QR code: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ParaskP7 🙏 🙇 Thanks for wrangling this. I look forward to seeing this in action once it is merged to trunk. Lots of good stuff in here!!
Great stuff, thank you so much for the review @zwarm ! 🙇 I am going to merge the latest |
… into analysis/detekt-fine-tune-default-rules
Generated by 🚫 dangerJS |
Parent: #16892
Closes: #14011
This long overdue PR, and following @malinajirka's suggestions here, includes the following:
GlobalCoroutineUsage
rule (a70d9f7).DataClassShouldBeImmutable
rule (f555742).SpacingBetweenPackageAndImports
rule (edcaa16).UnusedImports
rule (c11bb66).allowElseExpression
configuration for theMissingWhenCase
rule (91a5dd8).TODO
value to theForbiddenComment
rule, by reverting to using the default configuration (8aa70c8).java.util.*
value from theexcludeImports
configuration for theWildcardImport
rule, effectively makes sure that no imports are excluded (6a58246).Also, this PR aligns some of WPAndroid with the WCAndroid Detekt configuration (see detekt.yml), which includes the following:
ignoreDefaultParameters
configuration for theLongParameterList
rule (6f3a542). As part of that change all such entries from the baseline got either removed or moved inline and close to source.TooManyFunctions
rule (57cfec8). As part of that change all such entries from the baseline got either removed or moved inline and close to source.PS.1: This PR removes
172
entries from the baseline, which effectively leaves the baseline.xml file with less than300
entries long.PS.2: I recommend reviewing this PR commit-by-commit.
To test:
Regression Notes
N/A
See
To test
section above.N/A
PR submission checklist:
RELEASE-NOTES.txt
if necessary.