PhpStorm 2022.3 Help

Code Inspections in EditorConfig

This topic lists all PhpStorm code inspections available in EditorConfig.

You can toggle specific inspections or change their severity level on the Editor | Inspections page of the IDE settings Ctrl+Alt+S.

Inspection

Description

Default Severity

Deprecated property

Reports EditorConfig properties that are no longer supported.

Warning Warning

Duplicate character class letter

Reports wildcard patterns in the EditorConfig section that contain a duplicate character in the character class, for example [aa].

Warning Warning

Duplicate or redundant pattern

Reports file patterns that are redundant as there already are other patterns that define the same scope of files or even a broader one. For example, in [{*.java,*}] the first *.java pattern defines a narrower scope compared to *. That is why it is redundant and can be removed.

Warning Warning

EditorConfig section is not unique

Reports sections that define the same file pattern as other sections.

Warning Warning

Empty header

Reports sections with an empty header. Section header must contain file path globs in the format similar to one supported by gitignore.

Error Error

Empty section

Reports sections that do not contain any EditorConfig properties.

Warning Warning

Extra top-level declaration

Reports multiple top-level declarations. There can be only one optional “root=true” top-level declaration in the EditorConfig file. Using multiple top-level declarations is not allowed.

Error Error

File encoding doesn't match EditorConfig charset

Checks that current file encoding matches the encoding defined in "charset" property of .editorconfig file.

Warning Warning

Invalid property value

Reports property values that do not meet value restrictions. For example, some properties may be only “true” or “false”, others contain only integer numbers etc. If a value has a limited set of variants, use code completion to see all of them.

Error Error

Invalid reference

Reports identifiers that are either unknown or have a wrong type.

Error Error

No matching files

Reports sections with wildcard patterns that do not match any files under the directory in which the .editorconfig file is located.

Warning Warning

Non-unique list value

Reports duplicates in lists of values.

Error Error

Overlapping sections

Reports subsets of files specified in the current section that overlap with other subsets in other sections. For example: [{foo,bar}] and [{foo,bas}] both contain “foo”.

Weak Warning Weak warning

Overridden property

Reports properties that are already defined in other sections.

For example:

[*.java] indent_size=4 [{*.java,*.js}] indent_size=2
The second section includes all *.java files too but it also redefines indent_size. As a result the value 2 will be used for files matching *.java.

Warning Warning

Overriding property

Reports properties that override the same properties defined earlier in the file.

For example:

[*.java] indent_size=4 [{*.java,*.js}] indent_size=2
The second section includes the same files as [*.java] but also sets indent_size to value 2. Thus the first declaration indent_size=4 will be ignored.

Warning Warning

Redundant property

Reports properties that are redundant when another applicable section already contains the same property and value.

For example:

[*] indent_size=4 [*.java] indent_size=4
are both applicable to *.java files and define the same indent_size value.

Warning Warning

Redundant wildcard

Reports wildcards that become redundant when the “**” wildcard is used in the same section.

The “**” wildcard defines a broader set of files than any other wildcard. That is why, any other wildcard used in the same section has no affect and can be removed.

Warning Warning

Required declarations are missing

Reports properties that miss the required declarations. Refer to the documentation for more information.

Error Error

Space in file pattern

Reports space characters in wildcard patterns that affect pattern matching. If these characters are not intentional, they should be removed.

Weak Warning Weak warning

Too many wildcards

Reports sections that contain too many wildcards. Using a lot of wildcards may lead to performance issues.

Weak Warning Weak warning

Unexpected comma

Reports commas that cannot be used in the current context. Commas are allowed only as separators for values in lists.

Error Error

Unexpected key-value pair

Reports key-value pairs that are not allowed in the current context.

Error Error

Unexpected top-level declaration

Reports unexpected top-level declarations. Top-level declarations other than “root=true” are not allowed in the EditorConfig file.

Error Error

Unexpected value list

Reports lists of values that are used in properties in which lists are not supported. In this case, only a single value can be specified.

Error Error

Unknown property

Reports properties that are not supported by the IDE. Note: some “ij” domain properties may require specific language plugins.

Warning Warning

Unnecessary braces

Reports pattern lists that are either empty {} or contain just one pattern, for example {foo}. The braces are needed only if there are two and more, for example: {foo,bar}

Error Error

Unnecessary character class

Reports character classes that consist of a single character. Such classes can be simplified to a character, for example [a] → a.

Warning Warning

Unused declaration

Reports unused declarations. Such declarations can be removed.

Warning Warning

Last modified: 13 May 2022