Search code examples
simian

Simian multiple excludes option


I use Simian to analyze the duplicate codes in my c# project. But I want to exclude two kind of situations. One is unit test files shouldn't be analyzed, the other is auto-generated file (such as Microsoft.Moles auto produces m.g.cs files)

My arguments are fine as following when I only have one kind of file excludes

-formatter=vs:c:\temp\SimianResult.log -language=cs $(SolutionDir)/**/*.cs -excludes=**/*Test.cs -threshold=15

But when I add the second situtions, I don't know how to put them together, I search it on the web ,but cannot find samples, even the offical site https://simian.quandarypeak.com/ doesn't show it. I try the following combination but all fails
(1)... -excludes=**/*Test.cs,**/*m.g.cs -threshold=15
(2)... -excludes=**/*Test.cs;**/*m.g.cs -threshold=15
(3)... -excludes=**/*Test.cs **/*m.g.cs -threshold=15

Does anybody know how to solve it ? thanks


Solution

  • My co-worker has try the correct syntax for me and it works. The key is your have to put the keyword "excludes" twice. So the answer of my question is -formatter=vs:c:\temp\SimianResult.log -language=cs $(SolutionDir)//*.cs -excludes=/Test.cs -excludes=*/m.g.cs -threshold=15