InspectCode Ignores "--no-buildin-settings" flag

Answered

I have a very simple ".dotsettings" file, it has a singe rule:

<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/=RedundantEmptyFinallyBlock/@EntryIndexedValue">ERROR</s:String>
</wpf:ResourceDictionary>

I would like to use inspectcode.exe to inspect a solution and apply only the rules in the dotsettings file.

I'm running the command:

C:\Tools\JetBrains.ReSharper.CommandLineTools.2016.2.20160913.100041\inspectcode.exe --profile:c:\code\standards.dotsettings --no-buildin-settings -o:result.xml C:\Code\Admin\Admin.sln

The console output starts:

JetBrains Inspect Code 2016.2.2
Running in 64-bit mode, .NET runtime 4.0.30319.42000 under Microsoft Windows NT 6.2.9200.0
Custom settings layer is mounted. Used file c:\code\standards.dotsettings
Analyzing files
Analyzing .gitignore

The result.xml contains multiple <IssueTypes>, given that my custom dotsettingsfile only has a single code inspection I was expecting to only see one type of failure.

Am I miss using the tool, or does it not support this behavior?

Thanks

 

0
1 comment

--no-buildin-settings means that inspectcode will ignore your user settings overrides (from ReSharper, for example).
If you want to see only one type of error you need explicitly disable all other ones. Which seems almost impossible ;). So better for you to analyse result report and extract only necessary information, for example with XSLT.

 

0

Please sign in to leave a comment.