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 Control+Alt+S.
Inspection | Description | Default Severity |
---|---|---|
Reports EditorConfig properties that are no longer supported. | Warning | |
Reports wildcard patterns in the EditorConfig section that contain a duplicate character in the character class, for example | Warning | |
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 | Warning | |
Reports sections that define the same file pattern as other sections. | Warning | |
Reports sections with an empty header. Section header must contain file path globs in the format similar to one supported by | Error | |
Reports sections that do not contain any EditorConfig properties. | Warning | |
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 | |
Checks that current file encoding matches the encoding defined in "charset" property of .editorconfig file. | Warning | |
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 | |
Reports identifiers that are either unknown or have a wrong type. | Error | |
Reports sections with wildcard patterns that do not match any files under the directory in which the | Warning | |
Reports duplicates in lists of values. | Error | |
Reports subsets of files specified in the current section that overlap with other subsets in other sections. For example: | Weak warning | |
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 | |
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 | |
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 | |
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 | |
Reports properties that miss the required declarations. Refer to the documentation for more information. | Error | |
Reports space characters in wildcard patterns that affect pattern matching. If these characters are not intentional, they should be removed. | Weak warning | |
Reports sections that contain too many wildcards. Using a lot of wildcards may lead to performance issues. | Weak warning | |
Reports commas that cannot be used in the current context. Commas are allowed only as separators for values in lists. | Error | |
Reports key-value pairs that are not allowed in the current context. | Error | |
Reports unexpected top-level declarations. Top-level declarations other than “root=true” are not allowed in the EditorConfig file. | Error | |
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 | |
Reports properties that are not supported by the IDE. Note: some “ij” domain properties may require specific language plugins. | Warning | |
Reports pattern lists that are either empty | Error | |
Reports character classes that consist of a single character. Such classes can be simplified to a character, for example | Warning | |
Reports unused declarations. Such declarations can be removed. | Warning |