# Naming conventions

> **TL;DR**
> `Settings | Editor | Code Style | C/C++`, `Naming Convention`
>
>
>
>
>
> Scope: IDE-wide (default) or Project-wide
>
>
>
> Associated inspection: Inconsistent Naming

Naming convention is a set of rules intended to unify all the symbol names across a piece of code or a project. Each naming rule defines the suffix, prefix, capitalization and compound words spelling for a certain type of identifier.

Note that you can also select the naming convention (along with other code style settings) from a predefined scheme, such as [Google](https://google.github.io/styleguide/cppguide.html) or [LLVM](http://llvm.org/docs/CodingStandards.html). For more information, refer to [Predefined code styles](predefined-code-styles.html).

Procedure: Configure naming rules

1. Open the Naming Convention tab in `Settings | Editor | Code Style | C/C++`.

2. Specify naming settings for the entities in your code:

![Naming convention settings](https://resources.jetbrains.com/help/img/idea/2026.2/cl_namingconventions_settings.png)

> **Tip:**
> For more information about header guard templates and settings, refer to [Header guards](header-guards.html).

* You can apply a rule for several entities at a time. Click the Entity Kind field and select multiple options: ![Applying naming rule to multiple code entities](https://resources.jetbrains.com/help/img/idea/2026.2/cl_namingconventions_settings_multentities.png) > **Note:** > If you clear all the checkboxes, the rule will be applied to all entity kinds. When several rules are applicable to an entity at a given code location, CLion uses the last one from the list.

* In the Naming Convention field, select the spelling style: `lowercase`, `camelCase`, `PascalCase`, `snake_case`, `Leading_upper_snake_case`, `Upper_Snake_Case`, `SCREAMING_SNAKE_CASE`, or `UPPERCASE`.

* You can also specify separate rules for particular types of some entities (for example, when you use specific naming for private/public class members or static/const variables). For this, set the Visibility and Specifier fields where applicable: ![Specifying visibility for member functions](https://resources.jetbrains.com/help/img/idea/2026.2/[inline](inline.html) refactorings.

Procedure: Inspect code for violations of the naming rules

You can check your code for consistency with the configured naming convention by using the Inconsistent Naming inspection. By default, this inspection is disabled - to turn it on, go to `Settings | Editor | Inspections | C/C++ | General`.

* When enabled, this inspection highlights the symbols that violate naming rules and suggests quick-fixes to instantly change them:

![Quick-fix for inconsistent naming](https://resources.jetbrains.com/help/img/idea/2026.2/cl_namingconventions_inspection.png)

* Also, you can run this inspection separately to check the entire code base or a subset of files. For this, run Code | Inspect Code or invoke the [Run Inspection by Name](running-inspections.html#run-one-inspection) dialog `Ctrl+Alt+Shift+I` (Windows), `⌘ ⌥ ⇧ I` (macOS), `⌘ ⌥ ⇧ I` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ⇧ I` (macOS System Shortcuts), `Ctrl+Alt+Shift+I` (XWin), `Ctrl+Alt+Shift+I` (GNOME), `Ctrl+Alt+Shift+I` (KDE), `Ctrl+Alt+Shift+I` (Emacs), `Ctrl+Alt+Shift+I` (Sublime Text), `⌘ ⌥ ⇧ I` (Sublime Text (macOS)), `⌘ ⌥ ⇧ I` (Xcode), `Ctrl+Alt+Shift+I` (Visual Studio), `⌘ ⌥ ⇧ I` (Visual Studio (macOS)), `Ctrl+Alt+Shift+I` (ReSharper), `⌘ ⌥ ⇧ I` (ReSharper (macOS)), `Ctrl+Alt+Shift+I` (QtCreator), `⌘ ⌥ ⇧ I` (QtCreator (macOS)), `Ctrl+Alt+Shift+I` (NetBeans), `Ctrl+Alt+Shift+I` (Eclipse), `⌘ ⌥ ⇧ I` (Eclipse (macOS)) and search for Inconsistent Naming. The results will be listed in the Inspection Results tool window:

![Inconsistent Naming inspection results](https://resources.jetbrains.com/help/img/idea/2026.2/cl_namingconventions_inspection_results.png)

## See also

### How tos

[Header guards](header-guards.html)

