Code Inspections in CSS
In CSS, ReSharper 2020.2 provides 22 proprietary code inspections, any of which you can disable or change its severity level.
These code inspections help you detect code issues in design time in all open files, and additionally they allow you to find code issues in specific scope.
Configurable CSS inspections are listed below, grouped by their categories.
Common Practices and Code Improvements (1 inspection)
This category groups inspections that hunt for medium severity issues that mainly affect code readability. Inspection ID EditorConfig property | Default severity |
---|---|
Two colons preferredDoubleColonsPreferred resharper_double_colons_preferred_highlighting | Suggestion |
Potential Code Quality Issues (17 inspections)
This category includes inspections that detect critical issues (code smells), mostly with Error or Warning level. This category also includes inspections that ensure localization assistance. Inspection ID EditorConfig property | Default severity |
---|---|
Cannot resolve file system pathPathNotResolved resharper_path_not_resolved_highlighting | Error |
CSS feature is not supported by a specific browserCssCaniuseUnsupportedFeature resharper_css_caniuse_unsupported_feature_highlighting | Hint |
CSS feature requires vendor prefix for a specific browserCssCaniuseFeatureRequiresPrefix resharper_css_caniuse_feature_requires_prefix_highlighting | Hint |
CSS symbol / syntax is not compatible with a specific browserCssBrowserCompatibility resharper_css_browser_compatibility_highlighting | Warning |
CSS symbol is obsoleteCssObsolete resharper_css_obsolete_highlighting | Hint |
Invalid hexadecimal value of colorHexColorValueWithAlpha resharper_hex_color_value_with_alpha_highlighting | Error |
Invalid valueInvalidValue resharper_invalid_value_highlighting | Error |
Property does not override vendor-prefixed propertyCssPropertyDoesNotOverrideVendorProperty resharper_css_property_does_not_override_vendor_property_highlighting | Warning |
Requires fallback colorRequiresFallbackColor resharper_requires_fallback_color_highlighting | Warning |
Syntax is not allowed in specified CSS versionSyntaxIsNotAllowed resharper_syntax_is_not_allowed_highlighting | Warning |
Two colons expectedDoubleColonsExpected resharper_double_colons_expected_highlighting | Error |
Unknown CSS classUnknownCssClass resharper_unknown_css_class_highlighting | Warning |
Unknown CSS symbolCssNotResolved resharper_css_not_resolved_highlighting | Error |
Unknown custom propertyUnknownCssVariable resharper_unknown_css_variable_highlighting | Warning |
Unknown vendor-specific extensionUnknownCssVendorExtension resharper_unknown_css_vendor_extension_highlighting | Hint |
Value is unexpectedUnexpectedValue resharper_unexpected_value_highlighting | Error |
Value should have unitsValueShouldHaveUnits resharper_value_should_have_units_highlighting | Error |
Redundancies in Code (3 inspections)
Code inspections in this category look for redundancies and dead code, which affect code readability and style, and could be safely removed. Some code redundancies cannot be fixed automatically, and quick-fixes for them are performed in the interactive mode, requiring the user input. But the majority of the redundancies can be fixed without user interaction, using either fix in scope or code cleanup. Inspection ID EditorConfig property | Default severity |
---|---|
Redundant codeRedundant resharper_redundant_highlighting | Warning |
Redundant CSS hackRedundantCssHack resharper_redundant_css_hack_highlighting | Warning |
Redundant measure unitRedundantUnits resharper_redundant_units_highlighting | Warning |
Redundancies in Symbol Declarations (1 inspection)
This category includes code inspections, mostly with the warning severity level, which detect empty and unused symbol declarations. Inspection ID EditorConfig property | Default severity |
---|---|
Declaration is emptyDeclarationIsEmpty resharper_declaration_is_empty_highlighting | Warning |
Last modified: 30 November 2020