cstools 是您需要的;如果您查看 ArcanistCSharpLinter.php,您可以看到这一点,它在其中查找 cslint.exe 作为默认二进制文件。
- - 编辑 - -
不确定您是否正在寻找正确的工具;所指的是这个由hach-que开发的,这里:
https ://github.com/hach-que/cstools
我对这个 linter 不是很熟悉(我自己不做任何严肃的 C# 开发),但是快速浏览一下源代码表明发现映射只是一个称为“发现”的字符串映射,它具有设置短绒。
另见:https ://github.com/hach-que/cstools/issues/1
在此处复制粘贴示例,因为这似乎是 SO 政策:
示例 .arcconfig:
{
"project_id": "Tychaia",
"conduit_uri": "https://code.redpointsoftware.com.au/",
"arc.autostash": true,
"load": [
"Build/Arcanist"
],
"unit.engine": "XUnitTestEngine",
"unit.csharp.xunit.binary": "packages/xunit.runners.1.9.1/tools/xunit.console.clr4.exe",
"unit.csharp.cscover.binary": "cstools/cscover/bin/Debug/cscover.exe",
"unit.csharp.coverage.match": "/^Tychaia.*\\.(dll|exe)$/",
"unit.csharp.discovery": {
"([^/]+)/(.*?)\\.cs": [
[ "$1.Tests/$1.Tests.Linux.csproj", "$1.Tests/bin/Debug/$1.Tests.dll" ],
[ "$1.Tests/$1.Tests.Windows.csproj", "$1.Tests/bin/Debug/$1.Tests.dll" ]
],
"([^\\\\]+)\\\\(.*?)\\.cs": [
[ "$1.Tests\\$1.Tests.Windows.csproj", "$1.Tests\\bin\\Debug\\$1.Tests.dll" ]
],
"([^/]+)\\.Tests/(.*?)\\.cs": [
[ "$1.Tests/$1.Tests.Linux.csproj", "$1.Tests/bin/Debug/$1.Tests.dll" ],
[ "$1.Tests/$1.Tests.Windows.csproj", "$1.Tests/bin/Debug/$1.Tests.dll" ]
],
"([^\\\\]+)\\.Tests\\\\(.*?)\\.cs": [
[ "$1.Tests\\$1.Tests.Windows.csproj", "$1.Tests\\bin\\Debug\\$1.Tests.dll" ]
]
}
}
示例 .arclint:
{
"linters": {
"csharp": {
"type": "csharp",
"include": "(\\.cs$)",
"exclude": [ "(\\.Designer\\.cs$)", "(Phabricator\\.Conduit(.*+))", "(TychaiaProfilerEntityUtil\\.cs)" ],
"binary": "cstools/cslint/bin/Debug/cslint.exe",
"discovery": {
"([^/]+)/(.*?)\\.cs": [
"$1/$1.Linux.csproj"
],
"([^\\\\]+)\\\\(.*?)\\.cs": [
"$1\\$1.Windows.csproj"
]
}
},
"license": {
"type": "tychaialicense",
"include": "(\\.cs$)",
"exclude": [ "(\\.Designer\\.cs$)", "(Phabricator\\.Conduit(.*+))", "(TychaiaProfilerEntityUtil\\.cs)" ]
}
}
}
无论如何,如果您无法让 cstools 正常工作,我建议您在 Github 存储库上打开一个问题;他似乎反应灵敏。另外,作为一名开源开发人员,听到其他人在使用您的工作总是很高兴。