-
Notifications
You must be signed in to change notification settings - Fork 5.7k
[JEWEL] Update Detekt and enable checks for public surface documentation #3395
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
base: master
Are you sure you want to change the base?
Conversation
| KtPsiFactory(root.project) | ||
| .createPhysicalFile(fileName = root.name, text = root.modifiedText ?: root.text) |
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.
Don't we need to remove this copy after the autocorrect is done running?
| Finding( | ||
| Entity.from(declaredFunction), | ||
| "Function ${declaredFunction.name} is missing property $prop.", | ||
| suppressReasons = listOfNotNull("Auto correct".takeIf { autoCorrect }), |
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.
nit: create a const val with the "Auto correct" string
|
|
||
| private val functionsToCheck: List<String> by config(defaultValue = listOf("equals", "hashCode", "toString")) | ||
|
|
||
| @Configuration("only check classes annotated with these annotations") |
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.
What's up with this @Configuration annotation?
7c9e4cc to
38bdbb8
Compare
- The initial idea of this PR was basically to start using the existing detekt rules to ensure we add public documentation. They are: - OutdatedDocumentation - UndocumentedPublicClass - UndocumentedPublicFunction - UndocumentedPublicProperty - But, when one of these conditions matches, the version 1.x from detekt considers it a failure and crashes the run - In this initial moment, my goal was to enable as "warning" level and reuse that information to log in the PR in case it's related to any touched code - However, some features like setting the minimum version to "break" is only added in the 2.x version of detekt
38bdbb8 to
ac9a0fc
Compare
JewelBaseRuleandJewelRuleSetProvider.initNote
TL;DR; The work is like 60~65% done. We need to revisit the documentation for v2 and update our config file to ensure we have everything under control. After wrapping up the detekt, we will need to get the report and combine with the changes in the PR to identify which entries the PR could resolve.