ReSharper 2026.3 Help

资源文件中的代码检查

在资源文件中,ReSharper 2026.3 提供了 17 项 专有代码检查 ,您可以 禁用其中的任何一项或更改其 严重性级别。
These code inspections help you detect code issues at design time in all open files, and additionally they allow you to find code issues in specific scope.

可配置的资源文件检查列在下方,并按其 类别分组。

语法问题(4 项检查)

此类别中的检查报告字符串字面量和文档注释中的 语法问题。

检查
ID
EditorConfig 属性

默认严重性

注释中的语法错误
GrammarMistakeInComment
resharper_grammar_mistake_in_comment_highlighting

建议

标记属性值中的语法错误
GrammarMistakeInMarkupAttribute
resharper_grammar_mistake_in_markup_attribute_highlighting

建议

标记文本中的语法错误
GrammarMistakeInMarkupText
resharper_grammar_mistake_in_markup_text_highlighting

建议

字符串字面量中的语法错误
GrammarMistakeInStringLiteral
resharper_grammar_mistake_in_string_literal_highlighting

已禁用

潜在的代码质量问题(8 项检查)

此类别包括检测关键问题(代码异味)的检查,主要具有 错误 或 警告 级别。 此类别还包括 确保本地化支持的检查。

检查
ID
EditorConfig 属性

默认严重性

无法解析符号
ResxNotResolved
resharper_resx_not_resolved_highlighting

警告

重复的资源名称
DuplicateResource
resharper_duplicate_resource_highlighting

警告

元素是可本地化的
LocalizableElement
resharper_localizable_element_highlighting

警告

格式字符串占位符不匹配
FormatStringPlaceholdersMismatch
resharper_format_string_placeholders_mismatch_highlighting

警告

资源未在基础文化中声明
NotDeclaredInParentCulture
resharper_not_declared_in_parent_culture_highlighting

警告

资源未在特定文化中重写
NotOverriddenInSpecificCulture
resharper_not_overridden_in_specific_culture_highlighting

警告

资源用空值重写了基础资源
OverriddenWithEmptyValue
resharper_overridden_with_empty_value_highlighting

警告

资源值类型无效
InvalidValueType
resharper_invalid_value_type_highlighting

警告

代码中的冗余(2 项检查)

此类别中的代码检查会查找冗余和无用代码,这些代码会影响代码的可读性和风格,并且可以安全地移除。 某些代码冗余无法自动修复,其快速修复需要在交互模式下完成,需用户输入。 但大多数冗余可以在无需用户交互的情况下修复,使用 范围内修复 或 代码清理。

检查
ID
EditorConfig 属性

默认严重性

冗余的字符串类型
RedundantStringType
resharper_redundant_string_type_highlighting

建议

资源被重写为相同的值
OverriddenWithSameValue
resharper_overridden_with_same_value_highlighting

建议

拼写问题(3 项检查)

这些检查 检测各种上下文中的拼写错误。

检查
ID
EditorConfig 属性

默认严重性

注释中的拼写错误
CommentTypo
resharper_comment_typo_highlighting

建议

标记属性值中的拼写错误
MarkupAttributeTypo
resharper_markup_attribute_typo_highlighting

建议

标记文本中的拼写错误
MarkupTextTypo
resharper_markup_text_typo_highlighting

建议

2026年 11月 6日