# Create custom inspections

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/ruby/llms.txt).

To create a custom inspection, you have to configure a [search and replace templates](search-templates.html). The IDE will search for code that matches the template and will highlight it in the editor.

Procedure:

1. In the Settings dialog (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Meta+Comma` (TextMate), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))), go to `Editor | Inspections`.

You can also press `Ctrl+Alt+Shift+H` (Windows), `⌘ ⌥ ⇧ H` (macOS), `⌘ ⌥ ⇧ H` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ⇧ H` (macOS System Shortcuts), `Ctrl+Alt+Shift+H` (XWin), `Ctrl+Alt+Shift+H` (GNOME), `Ctrl+Alt+Shift+H` (KDE), `Ctrl+Alt+Shift+H` (Emacs), `Ctrl+Alt+Shift+H` (Sublime Text), `⌘ ⌥ ⇧ H` (Sublime Text (macOS)), `Ctrl+Alt+Shift+H` (Visual Studio), `⌘ ⌥ ⇧ H` (Visual Studio (macOS)), `Meta+Alt+Shift+H` (TextMate), `Ctrl+Alt+Shift+H` (NetBeans), `Ctrl+Alt+Shift+H` (Eclipse), `⌘ ⌥ ⇧ H` (Eclipse (macOS)) and select Configure Inspections.

2. Select the profile in which you want to create a new inspection.

3. On the toolbar, click the Add Custom Inspection button (![the Add Custom Inspection button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg)) and select Add Structural Search Inspection…  if you want your inspection only to highlight code. Alternatively, click Add Structural Replace Inspection…  if you want your inspection to highlight code strings and suggest fixes.

![Adding a new Structural Search and Replace inspection](https://resources.jetbrains.com/help/img/idea/2026.3/add-ssr-template.png)

4. Configure the templates.

You can use a sample template and configure it according to your needs.

For more information about configuring search and replace templates, refer to [Search templates, modifiers, and script constraints](search-templates.html).

5. When finished, click OK.

6. In the Structural Search Inspection  dialog, type a name of the new inspection, specify a tooltip, description, and provide a suppress ID if necessary.

7. Apply the changes and close the dialog.

After that, your custom inspection is going to appear in the list of inspections of the current profile under the Structural search category. There, you can change its [severity](configuring-inspection-severities.html) and the [scope](configuring-scopes-and-file-colors.html) in which this inspection will run.

Note that the Structural search category is not available until you create at least one custom inspection.

When your inspection is ready, you can [run it](running-inspections.html#run-one-inspection).

## See also

### Procedures

[Search templates, modifiers, and script constraints](search-templates.html)

