我们有一个TeamCity的本地实例(2019.1.5),我想利用在解决方案的.editorconfig文件中设置的ReSharper配置属性。
在.editorconfig updates,more build options,better Roslyn support in Rider 2018.3 EAP和Index of EditorConfig properties之后,我有一个文件,当前包含以下内容:
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
charset = utf-8
insert_final_newline = true
[*.cs]
indent_style = tab
trim_trailing_whitespace = true
# ReSharper custom properties
resharper_unknown_css_class_highlighting = false
但是,仅凭这本身还不足以让TeamCity来解决这个问题,因为在构建后我仍然看到“未知CSS类”检查。
Configuring inspection severities with EditorConfig建议如果我是在本地使用的,则可能必须在ReSharper中启用它(不是),所以我想知道是否必须在TeamCity中配置类似的设置。 / p>
如何让TeamCity检查.editorconfig的ReSharper设置?
响应ReSharper版本和共享设置
响应Dmitry的回答,因为它长于评论:
不幸的是,我们安装了JetBrains ReSharper命令行工具版本2019.2.1,将其设置为默认值,并且我已经验证了该项目正在使用它。 (如果重要,则已安装2017.1.20170428.83814,但不是默认值或未使用;我打算删除它。)
对于您的第二个解决方案,是否(和其他情况一样)记录了(我假设).sln.DotSettings
的更改?由于我们还没有完整版本的ReSharper插件,因此我们尝试利用文档来手动更改.sln.DotSettings
文件。
例如,通过该文件删除此文件的方法是使用此.sln.DotSettings
文件:
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnknownCssClass/@EntryIndexedValue">DO_NOT_SHOW</s:String>
</wpf:ResourceDictionary>