code_inspections.md: ability to link Settings from description

This commit is contained in:
Yann Cébron 2022-01-11 17:20:57 +01:00
parent dc1af7e47c
commit 8a9bccc788

View File

@ -1,6 +1,6 @@
[//]: # (title: Code Inspections) [//]: # (title: Code Inspections)
<!-- Copyright 2000-2021 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. --> <!-- Copyright 2000-2022 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -->
The IntelliJ Platform provides tools designed for static code analysis called _code inspections_, which help the user maintain and clean up code without actually executing it. The IntelliJ Platform provides tools designed for static code analysis called _code inspections_, which help the user maintain and clean up code without actually executing it.
Custom code inspections can be implemented as IntelliJ Platform plugins. Custom code inspections can be implemented as IntelliJ Platform plugins.
@ -125,6 +125,12 @@ Implicit in using [`LocalInspectionTool`](upsource:///platform/analysis-api/src/
* The name of the description file is expected to be the inspection <path>$SHORT_NAME$.html</path> as provided by the inspection description, or the inspection implementation class. * The name of the description file is expected to be the inspection <path>$SHORT_NAME$.html</path> as provided by the inspection description, or the inspection implementation class.
If a short name is not provided by the plugin, the IntelliJ Platform computes one by removing `Inspection` suffix from the implementation class name. If a short name is not provided by the plugin, the IntelliJ Platform computes one by removing `Inspection` suffix from the implementation class name.
> To open related [settings](settings.md) directly from the inspection description, add a link with `settings://$CONFIGURABLE_ID$`, optionally followed by `?$SEARCH_STRING$` to pre-select UI element:
>
> `See <em>Includes</em> tab in <a href="settings://fileTemplates">Settings | Editor | File and Code Templates</a> to configure.`
>
{type="tip"}
### Inspection Unit Test ### Inspection Unit Test
> Please note that running the test requires setting system property `idea.home.path` in `test {}` block of <path>build.gradle</path>. > Please note that running the test requires setting system property `idea.home.path` in `test {}` block of <path>build.gradle</path>.
> >