Add note about inspection highlighting range

This commit is contained in:
Mikhail Glukhikh
2019-05-20 11:23:36 +03:00
committed by Mikhail Glukhikh
parent 3451c60f93
commit b68e536e2a
+3 -1
View File
@@ -25,6 +25,8 @@ used if there are no quick fixes available for the inspection).
- `ProblemHighlightType` should always be `ProblemHighlightType.GENERIC_ERROR_OR_WARNING` or empty (there's a correspondent overload for - `ProblemHighlightType` should always be `ProblemHighlightType.GENERIC_ERROR_OR_WARNING` or empty (there's a correspondent overload for
`ProblemsHolder.registerProblem()`), otherwise, it won't be possible to individually change the desired level in the inspection settings. `ProblemsHolder.registerProblem()`), otherwise, it won't be possible to individually change the desired level in the inspection settings.
- Inspection highlighting range shouldn't be too wide. For example, to show some problem in a class it's much better to highlight its name than to highlight the whole class (the latter just looks very nasty).
- Resolve operations (`analyze`, `resolveToCall`, `resolveToDescriptors`) are considered to be expensive and shouldn't be triggered more - Resolve operations (`analyze`, `resolveToCall`, `resolveToDescriptors`) are considered to be expensive and shouldn't be triggered more
often than it's absolutely needed. All possible checks should be applied on PSI or file text before actual resolve. often than it's absolutely needed. All possible checks should be applied on PSI or file text before actual resolve.
@@ -55,4 +57,4 @@ instance of Kotlin project and run inspection on the whole project (`Run Inspect
* Check the execution time and consider performance issues? * Check the execution time and consider performance issues?
* Check the memory consumption. * Check the memory consumption.
* Check the found problems for false positive. * Check the found problems for false positive.
* Try to apply a quick fix and check result. * Try to apply a quick fix and check result.